This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE 6.7 (Build 200906241340) VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03 OS: Linux, 2.6.31-14-generic, amd64 User Comments: jesterfred: Added a Class to the Palette as a component then dragged it onto the app GUI. Stacktrace: java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Class.java:0) at org.netbeans.modules.form.HandleLayer$NewComponentDrag.end(HandleLayer.java:3112) at org.netbeans.modules.form.HandleLayer$NewComponentDropListener.drop(HandleLayer.java:3285) at java.awt.dnd.DropTarget.drop(DropTarget.java:434) at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500) at sun.awt.X11.XDropTargetContextPeer.processDropMessage(XDropTargetContextPeer.java:165)
Created attachment 90306 [details] stacktrace
The corresponding code is Border.class.isAssignableFrom(paletteItem.getComponentClass()) i.e. paletteItem.getComponentClass() is null. In other words, the dragged class cannot be loaded. It is strange that the NewComponentDrag was not canceled before, see NewComponentDrag.init() line 3053. The only idea I have is that the drop() came immediately after initialization of NewComponentDrag, i.e., before it was canceled through invokeLater() invoked in NewComponentDrag.init().
*** Bug 181190 has been marked as a duplicate of this bug. ***
Fixed. Modified file: http://hg.netbeans.org/jet-main/rev/16efc53a47b5