Hi
I wanna allow only numeric values and dot (.) in my JTextField ...
i m using the following code in the KeyTyped Method which is only allowing numeric values but not allowing dot .
int value;
String s;
s =evt.getKeyText(evt.getKeyChar()) ;
value = Integer.parseInt(s);
if(!(value >=0) && (value<=9))
jtf_amount1.setText(jtf_amount1.getText().substring(0,jtf_amount1.getText().length()-1));
please let me know how to allow the dot as well in my JTextField .