JOptionPane.InputDialog Validation
My Question is I want to show frame on validation. If User enter correct name in Input Dialog and Press ok so then it should show frame otherwise it should exit or ask again username.
Here is my code snippet
String inputValue = JOptionPane.showInputDialog("Please Enter UserName");
if(inputValue=="admin")
{
setVisible(true);
}
else{
System.exit(0);
}
What i am missing because using above code when i enter any name dialog disappear and also i am not getting any Frame.Help will be really appreciated.

