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.

Bug 111942 - setbounds height and width were change to -1 ,-1 in generated code
Summary: setbounds height and width were change to -1 ,-1 in generated code
Status: RESOLVED DUPLICATE of bug 83370
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-03 17:49 UTC by norwoodjim
Modified: 2007-08-06 09:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description norwoodjim 2007-08-03 17:49:51 UTC
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
Comment 1 Jan Stola 2007-08-06 09:27:24 UTC

*** This issue has been marked as a duplicate of 83370 ***