Rob Bamforth's Blog
Java, SQL,T-SQL, MySQL, Networking, SQL Server, PHP, COM, DBA, ODBC

Posts Tagged ‘maximised’

JAVA set JFrame full screen (Maximised)

October 21, 2008

The code to maximise a JFrame:
Frame.setExtendedState(MAXIMIZED_BOTH);
This will maximise the JFrame mimicking the actions as if the option was selected from the frame.
The following code sets the size of the JFrame relative to the screen size:
Dimension scrn = getToolkit().getScreenSize();
Frame.setBounds( 0, 0, scrn.width, scrn.height – 30);
in this case the frame is not technically maximised, leaving the frame [...]