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.
Product Version: NetBeans IDE 7.3 RC2 (Build 201302050851) Java: 1.7.0_11; OpenJDK Server VM 23.6-b04 Runtime: OpenJDK Runtime Environment 1.7.0_11-b24 Please see the attached example dialog. 1. Verify the XML form file does not contain any 'pref=' XML attributes. 2. Open the dialog with the GUI builder. 3. Inspect the "Layout" properties of the "scrollPane" component. They should read: Horizontal Size: Default Vertical Size: Default Horizontal Resizable: checked Vertical Resizable: checked On my system the Vertical Size property has been set to a fixed value during opening the form. Saving the form, this fixed value will be written to the XML form file (by adding a pref="that value" attribute). I need to manually reset the Vertical Size layout property of the "scollPane" component to "Default" after opening the form with the GUI builder. Removing the "model" of the "table" component ("Reset to Default"), the Vertical Size layout property of the "scrollPane" component no longer changes silently.
Created attachment 131543 [details] Example dialog source code.
Created attachment 131544 [details] Example dialog XML form file.
TabbedPaneDialog example: 1. Verify the XML form file does not contain any 'pref=' XML attributes. 2. Open the TabbedPaneDialog with the GUI builder. 3. Inspect the "Layout" properties of the "tabbedPane", "textField1" and "textField2" components. They should all read: Horizontal Size: Default Vertical Size: Default Horizontal Resizable: checked Vertical Resizable: checked On my system some properties will have been set to fixed values during opening the form. Saving the form, those values will be written to the XML form file (by adding pref= attributes).
Created attachment 131546 [details] TabbedPaneDialog example source code.
Created attachment 131547 [details] TabbedPaneDialog example form file.
Thanks for the provided test cases. They show some specific quirks in real layout computation with JTabbedPane or JTable involved - which lead to some components ending up with different actual size than is their provided preferred size (e.g. the height of the table in the first example appears smaller than its preferred height, OTOH the height of the textfields in tabbed pane from the second example is bigger). The GUI builder then thinks it should update the defined size to match the actual size and cancels the defaults. But in this case (if such an layout was created from default size settings) it obviously should not. Implemented some more logic to better decide when to update the defined sizes. Also managed to workaround the wrong first size computation for the scroll pane with JTable demonstrated in the first example. Added some workaround for JEditorPane (related to bug 231636). http://hg.netbeans.org/jet-main/rev/91c8562b5aa7
Integrated into 'main-silver', will be available in build *201307012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/91c8562b5aa7 User: Tomas Pavek <tpavek@netbeans.org> Log: #226292, #231636: improving how size definition is preserved without unnecessary changes