<<< javax.awt.JFrame class | Index | JFrame Appearance >>> |
Default JFrame behavior:
When the user clicks Close button 'X', JFrame window becomes hidden, but the application keeps running.
To allow window to close and exit the application,
JFrame frame = new JFrame( "JFrame is me" ); frame.setBounds( 0, 0, 400, 300 ); frame.setDefaultCloseOperation( javax.swing.WindowConstants.EXIT_ON_CLOSE );
To change the window title.
frame.setTitle( "Celsius Converter App" );
To make window fixed-size (non-resizable)
frame.setResizable( false ); // default is true
<<< javax.awt.JFrame class | Index | JFrame Appearance >>> |