This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to maximize JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to maximize JDialog" Watch "How to maximize JDialog" New topic
Author

How to maximize JDialog

Lubomir Kolacik
Greenhorn

Joined: May 06, 2012
Posts: 8
Hello , I am working on java based simple program as my school work.
It is "Test maker" with implementet "Tester"..

I made tester gui as JDialog ,because it does not have maximalize/minimalize button.
However you can still minimalize it in windows easily ,just left click on panel with button "x" and select minimalize or through task manager.

However this GUI have to be always on top and should not be minimalized.

Is there any way I can maximalize JDialog to put this part of code into public void windowIconified(WindowEvent e) so everytime it will be minimalized ,it will be maximalized back.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
do you need the title bar and/or borders?

if not, you could try this

dialog.setUndecorated(true);
dialog.setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());

but you will still be able to alt-tab to other apps.

if this is a problem look up Full Screen Exclusive Mode
Lubomir Kolacik
Greenhorn

Joined: May 06, 2012
Posts: 8
Michael Dunn wrote:do you need the title bar and/or borders?

if not, you could try this

dialog.setUndecorated(true);
dialog.setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());

but you will still be able to alt-tab to other apps.

if this is a problem look up Full Screen Exclusive Mode


Thanks ,but it did not help my problem, since all Java windows can be minimalized through task manager .., but at least I managed setAlwaysOnTop(true) which stopped alt+tab problem ;)
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

So you didn't look up full screen exclusive mode?


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to maximize JDialog
 
Similar Threads
GUI - How to make a Class modal under another class
BookContractor Prompt for CustomerId
Maximize button in JDialog
JTable row and column selection listener
Action Listeners