the way you have your program now, 'cancel' will crash the program
when using a showInputDialog(), any of 'cancel', 'esc' or 'X' (top right corner)
will return null. your next line will then try to parse a null object
perhaps the easiest way to handle it is to check for null
String strChoice = JOptionPane.showInputDialog(...);
if(strChoice == null) break;//<-------------------------break out of the 'while'
choice = Integer.parseInt(strChoice);
[EDIT]
just re-read this and now noticed the try/catch, so it won't crash, but
checking for null would still be a simple way to handle it
[ October 17, 2006: Message edited by: Michael Dunn ]