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.
The validation of scenes behaves differently if the scene has already generated a view or not. The attached test cases (Junit/main method) reconstruct this behavior.
Created attachment 63831 [details] Testcase with the error
This issue can be easily worked around by changing order of layers. The Test1.java code has: public ErrorScene(){ addChild(conLayer); addChild(objLayer); } If it would be changed to: public ErrorScene(){ addChild(objLayer); addChild(conLayer); } then it would be working correctly. It is because of ConnectionWidget(Edges) validation depends on LabelWidget (Nodes/Pins) validation. Since the validation is done from first layer to the last layer, then it is necessary to have the Nodes and Pins first and the connection in the other layer. Since the easy workaround exists, lowering the priority to P3. Still keeping the issue open since ideally the library should stand this - it should just do the validation in two passes... Note that the Test1.java has an issue in it: The main() method is starting two Threads to work with the Scene. It is not correct. The Swing framework and Visual Library are single-thread libraries i.e. you can work with then from AWT-thread only. Therefore change the new Thread(...) lines to SwingUtilities.invokeLater(...).