In my application an error massage comes when the required data fields are not filled.
I did it as,
if(component.getSelectedItem().equals("")|description.getText().toString().equals("")){
JOptionPane.showMessageDialog(null,"Please insert required details \n ","Error",JOptionPane.ERROR_MESSAGE);
}
the problem: When I click "OK" when this massage pops up, it closes the entire window.
How can I avoid it. I want to return to the application when "OK" button pressed..
please help
thankx.