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.
On a JLayeredPane with and without layout manager I have a repeated unpredictable problem. The preview display is fine but when I run it swing components do not appear to be there. Here is one example. Every thing worked fine in preview and when run. Then I changed a jLabel text in the properties window from Jlabel10 to "". Looked at it in preview it was fine, then hit the run icon and all of the swing components could not be seen. I found the cause to be in the generated code section. setbounds height and width were change to -1 ,-1. Before tempSR.setBounds(530, 265, 51, 14); tempOut.setBounds(50, 10, 51, 14); tempPS.setBounds(250, 80, 45, 14); tempPR.setBounds(250, 215, 48, 14); ConnectButton.setBounds(690, 20, 90, 23); exitButton.setBounds(690, 60, 90, 23); hostReset.setBounds(690, 200, 90, 23); injectLED.setBounds(454, 140, 10, 11); targetTemp.setBounds(570, 50, 80, 17); refreshButton.setBounds(690, 160, 90, 23); After tempSR.setBounds(530, 265, -1, -1); tempOut.setBounds(50, 10, -1, -1); tempPS.setBounds(250, 80, -1, -1); tempPR.setBounds(250, 215, -1, -1); ConnectButton.setBounds(690, 20, 90, -1); exitButton.setBounds(690, 60, 90, -1); hostReset.setBounds(690, 200, 90, -1); injectLED.setBounds(454, 140, 10, -1); targetTemp.setBounds(570, 50, 80, -1); refreshButton.setBounds(690, 160, 90, -1); I created a testThis method and pasted the Before code into it, then called it at startup and everything looked ok again. It does not specifically happen when the text of a label is changed. Maybe when a component is added or resized or a new variable is added to the project. As I said it is not predictable but the result is always the same setBounds height and width set to -1 in the generated code section. Everything may work fine four hours then it happens. thanks
*** This issue has been marked as a duplicate of 83370 ***