Search code examples
javaeclipseswingtoolkit

how to run the program in maximum size in java


How to run the program in maximum size in java ,so that it shows the restore button also, without using Toolkit t=Toolkit.getDefaultToolkit(); as it doesn't show RestoreDown Button


Solution

  • frame.pack();
    frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    frame.setVisible(true);