I've got a text box that expects a double between 0.1 and 0.99. I would like to validate this right when the user enters the number and then tries to change the focus to another component. Is there data validation built in to Java? NetBeans?
Jeff Ciaccio, Java novice <br />Physics and AP Physics Teacher<br />Sprayberry High School <br />Marietta, GA
Sounds like something which would sit better on the Swing forum. Moving.
Joined: Nov 26, 2008
I'm very green with Java, so I just wanted to do something simple like:
1) cast the text as double (but I'm not sure how)
2) do an if then to check:
if (txt > double is < 0.1 or > .99) then set focus back on textBox and change the label's font color to red and bold