• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About JDialog's Z-order .

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My assignment firstly show a JDialog to config the connection to local or remote database ( at this time , the main JFrame is not visible ). But if i click other program ( even DOS console ) before the JDialog appear , the JDialog will not be shown to user . I think there may be some things wrong with the setting of this JDialog's Z-order . please help me . BTW , i set the JDialog shown modally.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Zhou,
I would try something like this ...
 
Eric Blische
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Zhou,
I would try something like this ...

I *think* this will accomplish what you need, coercing the dialog to come to the front while recognizing that it is modal.
Another possibility is to overload the setVisible
method of the dialog to invoke the superclass setVisible but also add a toFront().
Two ideas off the top of my head....
Eric
 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks , Eric .
With ur help , I have solved that .
 
reply
    Bookmark Topic Watch Topic
  • New Topic