So, I'm trying to make a simple program. I want to fill the jtextfield
with anything (symbols,number or words) but when I click on jubutton
there's a message dialog appears
This is my code,but it's not working as I want,because when I enter a character after a number the message dialog didn't shown up
if (!txtphone.getText().contains("1")&&!txtphone.getText().contains("2")&&!txtphone.getText().contains("3")&&!txtphone.getText().contains("4")&&!txtphone.getText().contains("5")&&!txtphone.getText().contains("6")&&!txtphone.getText().contains("7")&&!txtphone.getText().contains("8")&&!txtphone.getText().contains("9")&&!txtphone.getText().contains("0"))
{
JOptionPane.showMessageDialog(rootPane, "Input must number");
txtphone.setText("");
}