Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDialog - akward problem  RSS feed

 
Tys Seyffert
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • 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?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • 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...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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 Java Spring
  • Mark post as helpful
  • send pies
  • 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.
 
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!