This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

size of the frame

 
hari thatikonda
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey usually when we run the gui frame has the size that we specified when we maximize it, it grows up to full size of screen. here wht i want is when we run the the programme the frame should be the size of the screen(ofcourse differenct monitors have different screen size) and then i should be able to minimize for a certain length. how can i do that.
thank u
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
setSize((int)dim.getWidth(),(int)dim.getHeight());
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic