• Post Reply Bookmark Topic Watch Topic
  • New Topic

Non Numeric Characters

 
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
Marshal
Posts: 52581
119
  • 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!