I find answering a long series of prompts from JOptionPane too tedious. So I wrote a class that will automatically show displays and answer prompts by accessing the responses from a String array. Remove the import for JOptionPane and use this class.
   //-----------------------------------------------------------
   //  Following class for testing
   static class JOptionPane {        //  3/12/13
      static String[] retVals = {"1", "Crime and PunishmentX","DostoevskyX", "39.95", "5","1", "3", "DostoevskyX", "7"};  //  the responses to be returned by showInput
      static int idx = 0;  // index to above
 
      static public String showInputDialog(Object obj, String msg) {
         return showInputDialog(msg);
      }
      static public String showInputDialog(Object obj, String msg, String t, int i) {
         return showInputDialog(msg);
      }
 
 
      static public String showInputDialog(String msg) {
         System.out.println(msg + " >Return val="+retVals[idx]);
         return retVals[idx++];
      }
 
      static public void showMessageDialog(Object obj1, String msg) {
            System.out.println(msg);
      }
 
      static public void showMessageDialog(Object parent, Object msg, String title, int type) {
            System.out.println(msg);
      }
 
      static int INFORMATION_MESSAGE = 1;
      static int QUESTION_MESSAGE = 2;
      static int ERROR_MESSAGE = 3;
   }   //  end JOptionPane class for testing
The answers in retVals is for: http://www.javaprogrammingforums.com...tml#post146892

The problem is getting OPs to give a full and correct list of the responses.

Already had posted this: http://www.javaprogrammingforums.com...t-prompts.html