aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to set the Maximum size of Application Window when Loaded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set the Maximum size of Application Window when Loaded?" Watch "How to set the Maximum size of Application Window when Loaded?" New topic
Author

How to set the Maximum size of Application Window when Loaded?

Prithiraj Sen Gupta
Ranch Hand

Joined: Sep 13, 2006
Posts: 92
I am doing a Project I need to see the Application window with Full Screen size GUI. I have tried with method like setExtendedState(), SetMaximumSize(). setMinimumSize() and setMaximizedBounds(). I am using NetBeans as GUI Builder. I am not getting the requirement when the Form is executed. How can I fix this?

Thanks and Regards

Prithiraj Sen Gupta
[ January 21, 2008: Message edited by: Prithiraj Sen Gupta ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19542
    
  16

java.awt.GraphicsDevice has a method to set the (single) fullscreen window. You can get a reference to a GraphicsDevice object through java.awt.GraphicsEnvironment (either getDefaultScreenDevice or getScreenDevices), which has a static method to get a reference.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Well, it depends on what you mean by Full Screen size GUI. If you mean Full Screen Mode as in no title bars, no OS access, etc, Rob is on the right track. Take a look at this.

If you just want the Frame maximized setExtendedState is the way to go but you must call it after the UI is realized. So after setVisible(true).


GenRocket - A Test Data Generation Platform
rajathi amarnath
Greenhorn

Joined: Jan 28, 2008
Posts: 1
setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
use this command it will automatically open in fullscreen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set the Maximum size of Application Window when Loaded?
 
Similar Threads
Prototype and Scriptaculous
Scopes for prototype & scriptaculous
No Display
AJAX In Practice: implementing pagination?
classpath (what?, why? and how?)