IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes Maximize JFrame on run Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Maximize JFrame on run" Watch "Maximize JFrame on run" New topic
Author

Maximize JFrame on run

Ric T
Greenhorn

Joined: Aug 01, 2001
Posts: 4
hi!,
how can i automatically maximize my JFrame when i run the prog?
tnx!
RicT
Renee Zhang
Ranch Hand

Joined: Sep 10, 2001
Posts: 72
I found some code may solve your problem:
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
yourFrame.setSize(screenSize.width , screenSize.height);
Good luck!
Ric T
Greenhorn

Joined: Aug 01, 2001
Posts: 4
thnx for that code! but is there any other way to make my JFrame in maximize mode?
RicT
 
 
subject: Maximize JFrame on run
 
Threads others viewed
Components aren't seen in Frame/JFrame
how to disable resize button
Frame minimize and maximize buttons
How to disable maximise button of jframe
GridBagLayout "scrunched" together - messy?
IntelliJ Java IDE