Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help resizing my JScrollPane

 
Jeff Hinshaw
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic