Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4094834

The java.awt.swing.JSplitPane.setOrientation(int) should throw IllegalArgumentEx

XMLWordPrintable

    • swing1.0fcs
    • sparc
    • solaris_2.6
    • Verified



      Name: akC57697 Date: 11/23/97



       The java.awt.swing.JSplitPane.setOrientation(int) should throw IllegalArgumentException
      like the constructor does.

      -------------------Example-----------------------------------
      import java.awt.swing.JSplitPane;
      public class JSplitPaneEx {
          public static void main(String s[]) {
            JSplitPane c=new JSplitPane();
               try {
                c .setOrientation(JSplitPane.HORIZONTAL_SPLIT+123456789);
               } catch (IllegalArgumentException e) {System.exit(0);}
                 catch (Exception e) {
                        System.out.println("Unexpected "+e);
                        System.exit(0);
                        }
                    System.out.println("No reaction on invalid parameters.");
                    System.exit(0);
         }
      }
      -------------------Output------------------------------------
      (novo35 48): java JSplitPaneEx
      Unexpected java.lang.RuntimeException: JSplitPane: orientation must be one of JSplitPane.VERTICAL_SPLIT or JSplitPane.HORIZONTAL_SPLIT

      ======================================================================

            amfowler Anne Fowler (Inactive)
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: