User Interface:
Code written on the event of Check age Button:
int age;
age=Integer.parseInt(jTextField1.getText());
if(age<=0)
{
jLabel2.setText("ERROR");
}
else
{
if(age>0 && age<=50 )
{
jLabel2.setText("Young Age");
}
else
{
jLabel2.setText("Old Age");
}
}
No comments:
Post a Comment