setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); addWindowListener(new ExitOnClose()); buildGUI(); doLayout(); validate();