• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maximize JFrame on run

 
Ric T
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!,
how can i automatically maximize my JFrame when i run the prog?
tnx!
RicT
 
Renee Zhang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found some code may solve your problem:
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
yourFrame.setSize(screenSize.width , screenSize.height);
Good luck!
 
Ric T
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnx for that code! but is there any other way to make my JFrame in maximize mode?
RicT
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!