• Post Reply Bookmark Topic Watch Topic
  • New Topic

Number Format Exception  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to use the result of the conversion. Can i do that??




 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

There are all sorts of ways to verify whether a field contains a real number or not. Somebody asked a similar question last week, here. That was keyboard input rather than a text field but the principles are the same.
You can consider a regex on the contents of the field, or pass the text to something like a Scanner and see whether it is numeric. There are lots of other ways to do it.

Why are you using AWT components? Why are you using applets which most people consider obsolete?

I added code tags to your post. Always use them: doesn't it look better I also got rid of some blank lines, which you had too many of.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!