
Hi
I need to validate blank text field that can accepts only integers.
Here is my code
if(textField_1.getText().length()==0) JOptionPane.showMessageDialog(null, "enter text in textfield");
I wrote like this;but it fails to show message for integers.
Please help..

if(jTextField1.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Please enter text in the fields","Error",0);
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.