How can I accept only Numbers in a JTextField?
843805Feb 21 2007 — edited Feb 21 2007Hi... i have a little problem...
I have a JTextField in my JDialog, and I need tath teh JTextField only accept Numbers from the keyboard... In the moment when I Press a Key, I need to know if it is a Number or not... if it's not a number, it's can't be displayed in the JTextField...
And the same with letters...
Please help me... I try to do this with the KeyPressed and KeyTyped Event, but I can't do it work...
Regards...