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.
Matisse will change the default border and margins of some components, presumably to work around "ugliness" in some particular Look and Feels. The problem is that this is simply not in the realm of things that Matisse has any business messing with. By attempting to work around appearance issues in some specific look and feels it has broken the general case by removing needed borders and margins of other look and feels. The Quaqua look and feel used by some Mac developers is an example of where this goes wrong.
I am highly interested to see Quaqua work well with Matisse. If this is not going to be fixed, I will add workarounds to the Quaqua Look and Feel specifically for this. e.g. by implementing a System property, which will make the UI ignore border and margin settings. -Werner Randelshofer, Quaqua Look and Feel
I have been bitten by this bug using Quaqua on Mac OS X. I think that Matisse is endangering the Java Desktop by enforcing arbitrary rules: it would be better for Matisse to do less and allow products like Quaqua and JGoodies to make enhancements which improve the user experience on the end-platform. A Matisse L&F is legitimate but it shouldn't usurp any prerogatives. Stephen Winnall, Vimia GmbH
I don't agree that Matisse shouldn't modify borders and margins because that would make the forms ugly on standard look and feels. On the other hand I understand that these changes may not work well with other look and feels. Unfortunately I don't see a good solution there. Do you have any idea? Note that you can always restore the default border and margin for any component within Matisse.
> I don't agree that Matisse shouldn't modify borders and margins because that > would make the forms ugly on standard look and feels. The problem is that this 1) prevents future fixes on the standard look and feels, and 2) all look and feels are now forced to not have the border and margins set to the values that are preferred by Matisse. > Do you have any idea? Note that you can always restore the default border > and margin for any component within Matisse. I would to have an option in the IDE allowing me to turn this behavior off.
> I don't agree that Matisse shouldn't modify borders and margins because that > would make the forms ugly on standard look and feels. The problem is that this 1) prevents future fixes on the standard look and feels, and 2) all look and feels are now forced to not have the border and margins set to the values that are preferred by Matisse. > Do you have any idea? Note that you can always restore the default border > and margin for any component within Matisse. I would like to have an option in the IDE allowing me to turn this behavior off.
> I would like to have an option in the IDE allowing me > to turn this behavior off. Of course, we will not make this option visible in UI (e.g. in Options dialog), but we can provide you a System property, for example netbeans.form.laf_tweaks that would turn the modification of borders and margins off (for newly created components). You can recommend usage of this option on your web (in the IDE integration section) e.g. besides flags like -J-DQuaqua.opaque=true you would add also -J-Dnetbeans.form.laf_tweaks=no. Would that work for you?
jstola: that's a good proposal, which would work fine for me. There is a little downside though. If you are not going to make this switch visible in the UI of NetBeans, then the majority of the layouts created with Matisse will still not work with the Quaqua look and feel. Therefore, I still need to implement a workaround for this in the Quaqua Look and Feel. Maybe I'll make Quaqua support a System property or UIManager property that enforces borders and margins. i.e. "Quaqua.enforceVisualMargins=true" or something... On the upside, I think, I have found now a way, to get rid of the "ugliness" of the standard look and feels, even if the netbeans.form.laf_tweaks switch is turned to off. A program just needs to put the "Matisse values" into UIManager after it has set a standard look and feel. (e.g. put an EmptyBorder to CheckBox.border after the CrossPlattformLookAndFeel has been set). This will also fix the "ugliness" when other layout managers than GroupLayout are in use. Thanks, Werner
*** Issue 96489 has been marked as a duplicate of this issue. ***
*** Issue 97255 has been marked as a duplicate of this issue. ***
After all we decided to stop setting the zero border and margin to checkboxes and radiobuttons due to problems on Mac (Aqua), Metal look&feel and potentially other areas. We are aware of the impact on Windows platform, but it seems there's no choice - it was a hack trying to fix a problem in Swing that can't be fixed on our side. I think in this situation we don't need the described cmd line switch (system property) anymore. Changed file: /cvs/form/src/org/netbeans/modules/form/MetaComponentCreator.java new revision: 1.106; previous revision: 1.105