import javax.swing.JOptionPane; /** * String Parser, parse out letters from a STring * * Hunter lloyd * 4/21/04 */ public class Driver { public static void main(String [] args) { int input=0; StringParser sp = new StringParser(); do{ sp.begin(); try{ input = Integer.parseInt(JOptionPane.showInputDialog("Press 2 to exit, 1 to continue")); }catch(NumberFormatException e) { System.out.println("That was not a choice, try again"); System.out.println(" Here is the error " + e); input=1; } }while(input!=2); } }