• Post Reply Bookmark Topic Watch Topic
  • New Topic

resizing JInternalFrame when content grows  RSS feed

 
Pieter-Jan Malfait
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i have a JPanel inside a JInternalFrame that can change its size (it grows)
is there any way to make the JInternalFrame grow with it, now i have to manually resize it...

thanks a lot in advance!
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try calling pack() on the JInternalFrame after the panel is resized. That will resize it to its preferred size.

I don't think there is a way to have the JInternalFrame resize automatically, but pack() is at least easier than manually resizing.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!