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.
Found in NB20060315-1215 version. According to guidelines, spacing between command buttons and last component must be: Windows: N/A Metal/Gnome: 18 px In case a component has 3D effect, 1 pixel must be subtracted from the right and bottom side of the component. Because Windows guidelines doesn't talk about this kind of spacing, I'm suggesting use same spacing like in Metal/Gnome L&F, it's 18 px. Windows guidelines: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch14e.asp Metal guidelines: http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html Gnome guidelines: http://developer.gnome.org/projects/gup/hig/2.0/design-window.html#window-layout-spacing
> spacing between command buttons and last component must be ... This rule cannot be reasonable automatized unfortunately. For example, the notion of 'command button' and 'last component' is not very clear (from the view of form designer). Happily, it is always possible to select the "command button" and use Space Around Component action to fine tune the size of the gap where it is appropriate.
IMHO, space around component is not the right solution as the inset needs to be calucated dynamically based on platform/system settings. So perhaps there needs to be a way for the user to specify that components are unrelated but should not be forced to specify an inset in pixels. I think this issue should be REOPENED.
We'll add support for unrelated gap - that's issue 73604. But there is no type of gap for vertical distance of command buttons defined in LayoutStyle we could use. Not sure if it makes sense to define it - if it is only required by Metal guidelines. If you feel strong about it, we need to file an enhancement on GroupLayout/LayoutStyle to fix this in JDK. Once we have it in the layout infrastructure, we can support it. I don't see any other way.
The create a compliant, consistent and good looking UI; this gap of 18 px is important (suggested for both Metal and Windows). If we don't implement this rule, users will probably come with their own (inconsistent) spacing or will use the unrelated gap of 11 px - which is not good IMHO. I think this issue should be reopened.
I agree with Jirka. 11 pixels isn't enough and every dialog needs this gap, so it would be good to treat it special.
*** Issue 74313 has been marked as a duplicate of this issue. ***
After discussion we agreed the solution could be to provide a new type of gap (in addition to RELATED and UNRELATED) that would appear as 18 pixels in the code until the new constant is introduced in Swing (LayoutStyle).
Fixed together with issue 73604. *** This issue has been marked as a duplicate of 73604 ***