-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
swing1.0fcs
-
sparc
-
solaris_2.5.1
-
Verified
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.
======================================================================