<Swing Dev> Native look and feel on linux [2]
Yan
yanp.bugz at gmail.com
Mon May 23 18:03:07 UTC 2016
> Hmm. Does not sound right. ie the case of "I do not hardcode ... it
looks .. GTK on Linux".
Oh, I've missed one detail, I've edited
/etc/java-7-openjdk/swing.properties :
# uncomment to set the default look and feel to GTK
swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
swing.aatext=true
awt.useSystemAAFontSettings=on
This config file makes all apps to use GTK by default, BUT if the app
hardcodes it's LAF to System - it looks Metal. The only way to change it
is to use _JAVA_OPTIONS. But every time any java app starts it outputs:
"Picked up _JAVA_OPTIONS...", which is annoying. I would like to be able
to set default LAF for all swing apps without _JAVA_OPTIONS or supress
"Picked up _JAVA_OPTIONS..." output. Currently I'm unable to do it. What
is needed is swing_obey.properties, which would be respected by any kind
of app. I want to tell openjdk, that I use gnome.
Regards, Yan
More information about the swing-dev
mailing list