Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to maximize JDialog

 
Lubomir Kolacik
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you didn't look up full screen exclusive mode?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic