• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to maximize JDialog

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ;)
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you didn't look up full screen exclusive mode?
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic