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 20941

Summary: [GridBagLayout Customizer] If you set "insets" property by FormConnection and change by GBCustomizer -> wrong code generated
Product: guibuilder Reporter: Marian Mirilovic <mmirilovic>
Component: CodeAssignee: issues@guibuilder <issues>
Status: CLOSED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: -FFJ-   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Marian Mirilovic 2002-02-27 13:40:11 UTC
[ffj4.0_ea](20020225), [jdk1.4](92)

Steps to reproduce:
- open/create JFrame
- add JLabel
- change layout to GridBagLayout
- invoke customizer (FormConnection) for property Insets (jLabel1|Layout)
- chnage value for Form | getInsets()
-> right code id generated :
	gridBagConstraints.insets = getInsets();
- invoke GridBagLayout Customizer
- select jLabel1
- push form Insets panel button "+"
-> wrong code is generated :
	gridBagConstraints.insets = null;

If you now save/close designed frame and regenerate code, right code is
generated :
	gridBagConstraints.insets = new java.awt.Insets(1, 0, 0, 0);

This issue should be fixed by fixing issue 20940 (removing possibility to invoke
customizer for layout properties ), but in my opinion this isn't right way.
Comment 1 Tomas Pavek 2002-03-06 10:57:16 UTC
The cause is exactly in issue 20940...

*** This issue has been marked as a duplicate of 20940 ***
Comment 2 Marian Mirilovic 2002-03-08 09:52:36 UTC
closed