-1

I want to make a Java app. with full screen which would run correctly on all screen resolution.

I tried Toolkit in my JFrame it made my frame full screen but some its components (e.g. JButton, JTextField) were not shown when I run it on 800 x 600 screen size, but properly shown in 1600 x 900 screen size.

How to make full screen Java app. with robust component layout?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • Possible duplicate of [How to dynamically control auto-resize components in Java Swing](https://stackoverflow.com/questions/30198953/how-to-dynamically-control-auto-resize-components-in-java-swing) – juzraai Jul 22 '18 at 10:11

4 Answers4

1

may be you used 'null' for your JFrame

setLayout(null).

Please use your required layout for the JFrame

Faiz Ahmed
  • 396
  • 6
  • 13
0

Try it :

JFrame jf = new JFrame();
jf.setExtendedState(JFrame.MAXIMIZED_BOTH); 
jf.setUndecorated(true);
jf.setVisible(true);
Majva
  • 88
  • 1
  • 5
0

Try this: setExtendedState(JFrame.MAXIMIZED_BOTH);

nil4925
  • 23
  • 1
  • 5
0

this.setExtendedState(JFrame.MAXIMIZED_BOTH);
you can try the above one it will resize the whole java app window to the available desktop resolution.