I am developing a small application in Java using Netbeans. I use a JFrame as a base control and drag and drop all required controls over it as appropriate.
The application is working fine as expect. Now i simply want that when my application runs for the fist time the size of my Application window should be equal to the size of my screen. In simple words i want my application to be maximized when it opens. Following is the code for my main method:
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
MyUI myframe = new MyUI();
myframe.setTitle("my tiltle");
myframe.setVisible(true);
//new GPrideUI().setVisible(true);
}
});
}
See
Frame.setExtendedState(int)
which: