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 3417 - Containers are not handled as well in the Form Editor as they should be.
Summary: Containers are not handled as well in the Form Editor as they should be.
Status: CLOSED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P1 major (vote)
Assignee: Jon Koplin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-08-17 18:25 UTC by Jon Koplin
Modified: 2003-06-30 18:26 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 Jon Koplin 1999-08-17 18:25:49 UTC
Everytime I create a Jpanel component, that I want to use several times within a frame, its Layout is destroyed because Netbeans resets the Layoutmanger after creation within the non editable region
 of
initComponents by doing something like jPanel.setLayout(new GridbagLayout());.

- I create a Jpanel
- I set its Layout to GridBagLayout
- I arrange a few Buttons one at 0,0 and one at 0,1 so they appear lined up vertical
- I compile the panel and add it to the component Pallet as a link object

- I create a JFrame
- I set its Layout to GridBagLayout
- I add the Jpanel from above from the Component Palette
- Now I already see the buttons arranged horizontal this is because in the Jframe Source within the initComponent method Netbeans added a .setLayout() Command after the Constructor Call of the Jpanel.


     testPanel1 = new test.TestPanel ();

     testPanel1.setLayout (new java.awt.GridBagLayout ());    <--- here is the error line

though it shouldn`t reset the Manager as it is already set within the Constructor of the panel. Resetting
seems to destroy the Constraints that were set on the contained objects.
Comment 1 vnemec 2000-08-29 13:09:59 UTC
The bug is still present in Boston1087
Comment 2 vnemec 2000-08-29 13:24:59 UTC
This bug has the same originator as bug #7305 although the bug itself is
slightly different.
See Trung's Additional Comment for bug #7305.

*** This bug has been marked as a duplicate of 7305 ***
Comment 3 Quality Engineering 2003-06-30 18:26:45 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.