...
Code Block |
---|
JTextArea resultsTA = new JTextArea("initial text" JScrollPane scrollPn = new JScrollPane(); contentPane.add(scrollPn, BorderLayout.CENTER); // No center panel needed. ScrollPane added directly to frame. JTextArea displayTA = new JTextArea("initial text"); scrollPn.setViewportView(displayTA); // put the text area in the scroll pane |
SerialVersionUID compiler warning:
A very common compiler warning to receive is the following for your frame class and other customized GUI components:
...