jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes Need Help resizing my JScrollPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need Help resizing my JScrollPane" Watch "Need Help resizing my JScrollPane" New topic
Author

Need Help resizing my JScrollPane

Jeff Hinshaw
Greenhorn

Joined: Mar 11, 2005
Posts: 21
Howdy!

Have a JScrollPane that contains a JTextArea. Depending on user actions the JTextArea changes size. I used the .setColumns(n) method to change the size of the JTextArea. The JScrollPane is in a JPanel, which is in my JFrame.

I cannot get my screen to update after the changes are made, unless I pack() the JFrame, which changes the JFrame size (which I do not want to happen.)

I have tried validate and revalidate on the panel and the scrollpane.

Any thoughts? Thanks!


Peace,<br /> <br />Jeff
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
 
subject: Need Help resizing my JScrollPane
 
Similar Threads
Contents of JFrame not maximizing
ScrollBar on a Frame ??
How do I change size of JTextArea
Problem with JTree inside JScrollPane inside JPanel
JScrollPane does not work with JTextArea