Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

DialogBox is gone after setModal  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had setModal at a JDialog at top of a Frame. But everytime when i open others program and back to maximise the frame of that Java program, the JDialog box will be gone. Only after i click the Alt+Tab key, the JDialog will pop up back. Otherwise only the JFrame will show but can't even close. Can somebody know why ?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember having the same problem a while ago, and I think the problem went away after making sure that the "owner" parameter of the constructor correctly referred to the parent dialog or frame. It's usually enough to use "this" in the constructor call (but this depends on what the class of the caller is):
new JDialog(this, "My dialog", true);
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"teeming"
your name is not in accordance with the javaranch guidelines.
Please take a moment and re-register after selecting a valid
name. you can find the guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that doesn't solve the problem, the jDialog still vanishes from sight until you use alt+tab or minimise every other application.
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this from an Applet?
 
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your dialog is truly modal from the frame you are launching it from, you should not be able to maximise the frame while the dialog box is showing...

Oops... I think I've already answered this question... you're really trying to launch from a JApplet... answered it here.

-Nate
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!