public void run() {
MyFrame myFrame = new MyFrame();
myFrame.setVisible(true);
myFrame.setExtendedState(myFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
}
The above code will work Provided that you are extending the JFrame
------------------------------------------------------------------------------------------
Searches related to java swing maximize window java jframe maximize window java maximize frame java close jframe jframe close jframe resize center jframe close a jframe on clicking a button center jframe on screen.How to maximize a JFrame