• Post Reply Bookmark Topic Watch Topic
  • New Topic

Waiting on a JDialog  RSS feed

 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My program creates a JDialog as a child of a Frame. The JDialog gets some parameters from the user and the main Frame uses those to create an aquarium.

The problem is that the Aquarium is not waiting for the JDialog to finish, so it never gets the data. I wrote a workaround, but it feels like it is wrong.



isEmpty is set to false once submit is pressed.

Is there a better way to go about this? Thanks
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set the dialog's modal to true
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I knew the solution would be a simple one.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!