• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JDialog - akward problem

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey all,
i have an applet that, depending on what button you push, calls a different jdialog everytime. with some of the dialogs the program waits for the user to either press ok or cancel before it continues with the method that launched the dialog box, and with others it while the dialog is open it continues with the code in the calling method??
why is this happening?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Tys!
I'm moving this to the Swing / JFC / AWT forum, where folks just love to get all messy with this GUI stuff...
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like some of the dialogs are modal and some aren't...

You can set a dialog to be modal through either a boolean argument in it's constructor, or through the setModal( boolean ) method.
 
Tys Seyffert
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks nate,
but all the dialogs are created in the same way. they are all none modal with no parent(null) frame. ive tried setting all of them to modal but it is still the same.
Tys
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are the JDialogs being launched? Are all of them just constructed from regular JDialogs, or are they using different JDialog subclasses?

If they are using subclasses, maybe someone stopped execution from returning by using a wait() with a notify() in the dialog button's ActionListener or something.
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic