• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot close InputDialog  RSS feed

 
Adrian Lukaszek
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys. Have a problem with InputDialog (inside try catch block) which can't be closed by simple close button click (it pops out excaption message), and first have to enter correct data. How to deal with it? Here is a part of code:


Thanks in advance
 
Les Morgan
Rancher
Posts: 768
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't ever account for the condition where you wouldn't get any input. In your very next line you have:

which when you parse a null String, guess what you get? Fix that problem and you should be OK.
 
Campbell Ritchie
Marshal
Posts: 55793
164
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using dialogues? Why not have text fields for entering the number?
 
Adrian Lukaszek
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for help Guys
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!