Jay Jay - 1 year ago 89
Java Question

How to set full Screen Mode of My App which is made in netbeans platform?

I m made Desktop App in netbeans platform in java.now wwhen i run my app it will open by default size of netbeans platform configuration.but i want full screen mode when i run or startup my app. so where and how to do that in my app?

Answer Source

If you want to open the JFrame maximized by default in swing you can use JFrame. setExtendedState(), illusrated below:

public class MyFrame extends JFrame{ 
   public MyFrame() {

       // Other codes 

       // Set the JFrame to maximize by default on opening

       // Rest of the program

Also remember that you should not have JFrame.pack() or JFrame.setMaximimumSize() or JFrame.setSize() in the same menthod (here constructor).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download