Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Do you usually setup a maximum size for JFrames?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because when the application comes across a big monitor,
with high resolution, it will mess up all the layout managers.
Thanks
Jack
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use pack(). Of course you call always set a "preferred size", not the maximum size. The max size would be full screen.
 
Randall Twede
Ranch Hand
Posts: 4690
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
private JFrame frame = new JFrame();
frame.setSize(590, 610);

is the size i set my last one for
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!