How to open application in netBeans IDE 7.0.1 in full screen mode?

Hej all,

I would like to open my application in netBeans in the fullscreen mode when running it.

I have tried many things. Lastly, I have tried to put following code to the "Customize code" option when clicked on PrefferedSize in the properties of the main JFrame:

Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();

Unfortunately, it doesnt work. Any ideas? Thanks.

-------------Problems Reply------------

By "fullscreen" do you mean "maximized"? If so, then try this:

myFrame.setExtendedState(myFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH);

You don't say what OS you're using, but if you're using Windows and you find your taskbar is covered by the maximized frame call this beforehand:

GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();

Category:java Views:0 Time:2011-12-07

Related post

Copyright (C), All Rights Reserved.

processed in 0.075 (s). 11 q(s)