This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need Help resizing my JScrollPane" Watch "Need Help resizing my JScrollPane" New topic

Need Help resizing my JScrollPane

Jeff Hinshaw

Joined: Mar 11, 2005
Posts: 21

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
It is sorta covered in the JavaRanch Style Guide.
subject: Need Help resizing my JScrollPane
Similar Threads
How do I change size of JTextArea
Contents of JFrame not maximizing
ScrollBar on a Frame ??
Problem with JTree inside JScrollPane inside JPanel
JScrollPane does not work with JTextArea