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 192507

Summary: The components hide
Product: guibuilder Reporter: rafael_br
Component: App FrameworkAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: normal CC: cpbridges
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description rafael_br 2010-11-26 10:59:19 UTC
I have a project with JTabbedPane and in it JLayeredPane, I like so much it, because before I need insert frame in JTabbedPane. However sometimes when I edit the JLayeredPane (inserting JTextField, JCheckBox, etc) and build the project some objects hide (or destroy?) in JLayeredPane. To resolve it problem I cut and paste all itens in JLayeredPane and rebuild.
I hope it help you.

Regards
Rafael
Comment 1 Tomas Pavek 2010-11-26 14:15:56 UTC
I'm sorry, I don't understand. Do the components hide only when you run the project, not in designer? Could you attach here a GUI form with tabbed pane / layered pane and describe steps how to reproduce the bug?
Comment 2 Tomas Pavek 2010-11-26 17:48:15 UTC
After getting a sample form from the reporter, it appears to be same problem as bug 82583. Some components in null layout have the height set to -1 in the generated code.

I can now reproduce it and so will be able to fix.

*** This bug has been marked as a duplicate of bug 82583 ***
Comment 3 Tomas Pavek 2010-11-30 13:31:48 UTC
It appears the preferred width/height is set to -1 if the component is in JLayeredPane. Does not happen in JPanel with null layout.
Comment 4 Tomas Pavek 2010-11-30 13:34:14 UTC
Steps to reproduce (verify):
1) Add JLayeredPane to a form.
2) Add e.g. JButton to the layered pane.
3) Save and close the form, open it again.
4) Add another component to the layered pane.
5) Go to source code - the first button has -1 width and height in the generated setBounds method.

Fix:
http://hg.netbeans.org/core-main/rev/90391d24f846
Comment 5 Quality Engineering 2010-12-01 06:39:24 UTC
Integrated into 'main-golden', will be available in build *201012010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/90391d24f846
User: Tomas Pavek <tpavek@netbeans.org>
Log: #192507: ensuring reference component is set to determine preferred size, same way as in null layout support
Comment 6 Tomas Pavek 2011-02-07 14:56:49 UTC
*** Bug 195071 has been marked as a duplicate of this bug. ***