-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: nkR10003 Date: 11/17/2000
Public JTable.addNotify() method throws
NullPointerExcption (NPE).
Example below demonstrates this problem:
------------------example--------------------
import javax.swing.*;
public class test {
public static void main(String[] args) {
JTable c = new JTable(); // step Create JTable object
JScrollPane pane = new JScrollPane(c);
try {
c.addNotify();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("Test Finished");
System.exit(0);
}
}
----------------output:----------------------
java.lang.NullPointerException
at java.awt.dnd.DropTarget.addNotify(DropTarget.java:436)
at java.awt.Component.addNotify(Component.java:4508)
at java.awt.Container.addNotify(Container.java:1748)
at javax.swing.JComponent.addNotify(JComponent.java:3799)
at javax.swing.JTable.addNotify(JTable.java:416)
at test.main(test.java:7)
Test Finished
---------------------------------------------
======================================================================