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

returning a value from a custom dialog  RSS feed

 
Leon Glass
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I would like to alter the following code so that showNewLevel() is able to return the input[]. If I just alter the signature and add the return as it is I get a return value of null I think because the actionlistener isn't called when I think it is. How can I make this method have similar functionality to JOptionPane.ShowInputDialog()?
 
Leon Glass
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that I only needed to set my dialog as modal and I have the functionality I require.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!