Top.Mail.Ru
June 5th, 2002 - Java developers — LiveJournal
? ?

Java developers

June 5th, 2002
Image

12:07 pm - Imageevilleprechaun - TextField numbers

Hi there. New to the community, promises to be entertaining at the least ;-) I have a question about applets and number fields. Is there a way to say, have a field (like a TextField) that uses numbers? The only way I've figured out how to do it is a combination of Double(textFieldVariable.getText()) and the .doubleValue() -- or .intValue() -- of that. This works, except that entering Strings is still possible, and has the nice effect of not giving me a real number at all. And, somehow, it's not a Double.NaN, it's not infinite, it's not <= 0.... I just have no idea what it's doing. If anyone has ideas on what it is doing, or, better yet, how to make/use number fields, I'd really appreciate it! Thanks a million in advance.
Powered by LiveJournal.com
Image