Search

Load Java NetBeans Form in Maximize Mode

While loading the jFrame Form, by default it will load in Preferred Size which can be defined manually by the Developer from Property Window. Since the size of the Screen differs in different Computer System, we cant  define a static Screen Size. Instead we can set the Form to be Loaded in Maximize Mode.

This can be done easily by adding the setExtendedState to MAXIMIZED_BOTH below the initComponents();
How to load Java Form in Maximized Mode
view plaincopy to clipboardprint?
  1. public MainForm() {  
  2. initComponents();  
  3. this.setExtendedState(MAXIMIZED_BOTH);  
  4. }