import groovy.swing.SwingBuilder import griffon.util.GriffonPlatformHelper GriffonPlatformHelper.tweakForNativePlatform(app) SwingBuilder.lookAndFeel('mac', 'nimbus', 'gtk', ['metal', [boldFonts: false]])
The crux of the problem is SwingBuilder tries various L&Fs in the order you specify them and stops when it finds one that works. Nimbus is the L&F for Java 6 but previous versions of Mac OS X shipped with Java 5. So SwingBuilder would try Nimbus and it would fail then it would try the Mac look and feel which would work. Snow Leopard ships with Java 6 so when SwingBuilder tried Nimbus, it worked and it never tried to set the Mac L&F.
EDIT: This will be the default behavior in the upcoming Griffon 0.2 release. So you will only need this fix if you have Griffon apps from pre-0.2 days.
3 comments:
This will be the default for greenfield 0.2 Griffon applications.
Thanks Danno, I was just writing an email to griffon-dev as to whether this should be default, but that clears it up.
Thanks for sharing this information its really nice.
Poseidon Expeditions
Post a Comment