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

Non Numeric Characters  RSS feed

 
LaTeef Lusk
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a way that you could check for non numeric characters with the exception of currency formatting. ($, .)
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> is there a way that you could check for non numeric characters with the exception of currency formatting. ($, .)

use a regex to compare, but you might be better off using a JFormattedTextField,
and there are other ways you can bar certain characters from input
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And check out the methods of the java.lang.Character class. There are lots called things like isDigit(). They might help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!