try to check for null and then check actual condition using and
if (text!=null&&text.equals("yes"))
{
JOptionPane.showMessageDialog(this,"TEXT ENTERED IS YES");
}else if (text!=null&&text.equals("no"))
{
JOptionPane.showMessageDialog(this,"TEXT ENTERED IS NO");
}else if(text!=null&&text.equals("")){
JOptionPane.showMessageDialog(this,"U DIDN'T ENTERED ANY TEXT");
}
I hope it works....enjoy working
Do not hesitate to opt for any help to me.
Afzalur Rashid
afzal_01@yahoo.com