You are on page 1of 1

private void jButton1ActionPerformed(java.awt.event.

ActionEvent evt) {
if(txtEdad.getText().matches("[1-9]{1}([0-9]{1,2})?"))
{
JOptionPane.showMessageDialog(this,"Correcto");
}
else
{
JOptionPane.showMessageDialog(this,"Dato Incorrecto");
}
}

You might also like