JTextArea fixed size in JTabbedPane
Posted on 2006-05-01
Dear java experts,
I have a JTextArea that I put into a JScrollPane, the JScrollPane then goes into a JPanel and finally the JPanel goes into a JTabbedPane.
The problem is that when I hold the enter key down in the JTextArea the curser moves down to the next line and when it reaches the end of the JTextArea (last visible line) and I press enter again, the JTextArea resizes (height increases) so eventually it does not fit into the JFrame.
What could be causing this? Isnt the JTextArea suppose to be fixed size?
addressText = new JTextArea("Enter address here");
scrollPane = new JScrollPane();
addressPanel = new JPanel();
tabbedPane = new JTabbedPane();
tabbedPane.addTab("Details", detailsPanel); //This is another panel that im adding as the first tab
tabbedPane.addTab("Address Details", addressPanel);