You are not logged in.
I tried the methods provided in the wiki, attempted using the swing.properties file, even running it with java directly(with the options enabled) and all of them have absolutely no effect whatsoever, I still get the default "metal" theme in all java windows except for eclipse.
Offline
Some java programs set the look and feel themselves, ignoring the properties you may set. They usually have a setting to change it.
Can you give me a specific example of a program that is not getting the settings, and exactly what you are doing to set it? A common program I can download and try myself would be most helpful.
Offline
One such application is geograbra
when run from console, I get this :
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
I've attempted to put
export _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
in the usual places, /etc/profile.d/jre.sh, .bashrc, and as well trying to run
java -jar -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel /usr/share/java/geogebra/geogebra.jar
to no avail
Offline
I confirm that following the instructions in the wiki on this subject does not have the expected result. Running the NetX control panel (itweb-settings) from the icedtea-web-java7 package with _JAVA_OPTIONS set as described does enable anti-aliases fonts, but doesn't switch from Metal to GTK. I haven't tested any other Java stack besides jre7-openjdk (and I'm not going to do so, since switching Java installs is disruptive).
Offline
It appears the GeoGebra ignores the default property, and forces the Metal Look and Feel by calling UIManager.getCrossPlatformLookAndFeelClassName() to get the look and feel. Luckily java lets you set the cross platform look and feel name with a property.
This is a little bit of a hack, but it will force geogebra to use GTK:
java -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar /usr/share/java/geogebra/geogebra.jar
Offline
It appears the GeoGebra ignores the default property, and forces the Metal Look and Feel by calling UIManager.getCrossPlatformLookAndFeelClassName() to get the look and feel. Luckily java lets you set the cross platform look and feel name with a property.
This is a little bit of a hack, but it will force geogebra to use GTK:
java -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar /usr/share/java/geogebra/geogebra.jar
I confirm that this works with NetX's own components as well. Very nice!
Offline
Thanks! that did the trick
Offline
Thanks! that did the trick
I'm glad to hear it worked for you. You should edit the message subject and add [SOLVED] to the front of it.
I added this trick to the Arch Wiki entry for java:
https://wiki.archlinux.org/index.php/Java
Last edited by johni (2012-12-12 16:38:26)
Offline