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

The method java.awt.swing.JScrollBar.setOrientation(int) does not check paramete

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      swing1.0fcs
    • CPU:
      sparc
    • OS:
      solaris_2.5.1
    • Verification:
      Verified

      Description



      Name: akC57697 Date: 11/19/97



      The method setOrientation(int) does not check parameter
      which must be SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
      only.

      -------------------Example-----------------------------------
      import java.awt.swing.*;
      public class TestJScrollBar {

          public static void main(String s[]) {
             JScrollBar c= new JScrollBar();
               try {
                c.setOrientation(SwingConstants.VERTICAL+1000000);
                c.setOrientation(SwingConstants.VERTICAL-1000000);
               } catch (IllegalArgumentException e) {
                         System.exit(0);
                        }
                 catch (Exception e) {
                         System.out.println("Unexpected "+e);
                        }
                    System.out.println("No reaction on invalid parameter.");
                    System.exit(0);
          }
      }
      -------------------Output------------------------------------
      (novo35 46): java -fullversion
      java full version "JDK1.2U"
      (novo35 47): javac TestJScrollBar.java
      (novo35 48): java TestJScrollBar
      No reaction on invalid parameter.

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

        Attachments

          Activity

            People

            Assignee:
            sswingtrsunw Swingtraq Swingtraq (Inactive)
            Reporter:
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: