-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.3.0
-
sparc
-
solaris_2.5.1
Name: aaC67449 Date: 05/21/99
The JViewport.setViewPosition() throws unexpected NullPointerException
javadoc says: "
public void setViewPosition(Point p)
Sets the view coordinates that appear in the upper left hand corner of
the viewport, does nothing if there's no view.
Parameters:
p - a Point object giving the upper left coordinates
"
This bug appears in JDK-1.3D
It works correctly in JDK-1.3C.
---------------- example ---------------
public class Test {
public static void main(String argv[]) {
JViewport c = new JViewport();
c.add(new JButton());
c.setViewPosition(new Point(1,1));
System.out.println("PASSED");
}
}
-------------JDK-1.3D output---------
Exception in thread "main" java.lang.NullPointerException
at javax.swing.JViewport.setViewPosition(JViewport.java:974)
at Test.main(Test.java:10)
--- ---------JDK-1.3C output -------------
PASSED
======================================================================