import javax.swing.JOptionPane;
import java.text.*;
public class SimpleSignInExample{
public static void main(String[] args){
String choice = "";
try{
while (!(choice.equalsIgnoreCase("x"))){
String userName = null;
String userPassword = null;
String userAccount = null;
String userInfo = null;
String inputString = JOptionPane.showInputDialog(null,
"Enter last name, account and password (separate each
with a comma): ", JOptionPane.PLAIN_MESSAGE);
String message = "Last name: " + (userName) + "\n"
+ "Account: " + (userAccount) + "\n"
+ "Password: " + (userPassword) + "\n\n"
+ "To continue, press Enter.\n"
+ "To exit, enter 'x': ";
choice = JOptionPane.showInputDialog(null,
message, "Input", JOptionPane.PLAIN_MESSAGE);
}
}
catch(NullPointerException e){
System.exit(0);
}
System.exit(0);
}
When I compile I get 3 errors:
C:\java\bin\SinpleSignInExample.java:30: '}' expected
}
^
C:\java\bin\SinpleSignInExample.java:3: class SimpleSignInExample is
public, should be declared in a file named SimpleSignInExample.java
public class SimpleSignInExample{
^
C:\java\bin\SinpleSignInExample.java:15: cannot resolve symbol
symbol : method showInputDialog (<*>,java.lang.String,int)
location: class javax.swing.JOptionPane
String inputString = JOptionPane.showInputDialog(null,
^
3 errors
Process completed.
I am lost.. can anyone help?