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 Dev (Build 201011070000) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_22 Runtime = Java HotSpot(TM) Client VM 17.1-b03 To reproduce: - Create a new JPanel form - add three JButtons from left to right - Resize all three buttons so there is no gap between the top and bottom of the buttons and the edge of the form (you will already have to fight the GUI builder to do this, as it will move things around in undesireable ways as you edit are adjusting the layout) -select all three buttons and set them to auto-resize vertical. -test the form - the buttons do not resize. Workaround - you MUST leave a gap at the bottom of the buttons for the auto-resize to work. In NB 6.9.1 I could wrestle the GUI editor to make this work.. in 7.0 I can't get it to work.
I found a way to get it to work... leave a gap at the bottom of all three buttons, pick the middle button and "adjust space around component", set bottom amount to 0. All three buttons will snap to the bottom edge and the resize attribute willstick.. just don't touch it after that!
You have to struggle because adding the three buttons automatically centers the vertically. If you highlight the three buttons and click "Align top in row" button on the Designer toolbar, it makes it easy to snap to the top of the panel and then vertically resize them down and snap to the bottom of the panel. The auto-resize works in Product Version: NetBeans IDE Dev (Build 201110120600) with or without space at the top or bottom of them, so this issue is not an issue any longer. I am marking this as resolved.
This also works in Product Version: NetBeans IDE 7.0.1 (Build 201107282000) if non-Dev version is desired.
The baseline alignment stays in the way when resizing vertically. It should be canceled when snapping to something else (like the container border in this case). I've fixed it so this use case can be done directly without the workaround of top-aligning the buttons first. http://hg.netbeans.org/jet-main/rev/624bc4de9c05
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/624bc4de9c05 User: Tomas Pavek <tpavek@netbeans.org> Log: #191744: baseline resizing tweaks