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 64066 - Problem with generated code when changinf Layout
Summary: Problem with generated code when changinf Layout
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-11 20:54 UTC by Michel Graciano
Modified: 2005-09-12 15:46 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 Michel Graciano 2005-09-11 20:54:23 UTC
I create a JFrame and change the layout to BorderLayout, so add the JPanel into,
and see the generated code:

jPanel1 = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        org.jdesktop.layout.GroupLayout jPanel1Layout = new
org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
           
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
           
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );
        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

        pack();

The natural layout code are generated yet.
Comment 1 Michel Graciano 2005-09-11 21:00:10 UTC
Using JDK 1.5.0_01 and NB 5.0 dev build 200509072000
Comment 2 Jan Stola 2005-09-12 15:46:37 UTC
There is no problem. You have changed only the layout of JFrame,
but the attached code snippet is creation of the layout of the added JPanel.
If you want to get rid of GroupLayout even in this container you have
to change the layout in this container, too.