Enable native GTK Look and Feel for non-gnome desktops
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openjdk-7 (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned | ||
openjdk-8 (Ubuntu) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
The default System LAF - ie. UIManager.
This prevents the majority of Java applications to use the native GTK LAF when running.
Also, UIManager.
While the Default LAF can be set either as a system property or in swing.properties, the System LAF can only be set as as system property, thus there is no way to assign it system-wide.
Historically the GTK LAF was a source of bugs and errors. It is unclear if the situation has improved at all in the past few years.
= Workaround =
Currently there are only 2 alternatives to set GTK LAF system wide, both rely on editing the swing.properties file, depending on whether the Java application calls UIManager.
1) For applications that *don't* use it then add swing.defaultla
2) For applications that use it then add swing.installed
summary: |
- Native Look and Feel for Swing does not work + Enable native GTK Look and Feel for non-gnome desktops |
description: | updated |
Changed in openjdk-7 (Ubuntu): | |
importance: | Undecided → Wishlist |
Changed in openjdk-8 (Ubuntu): | |
importance: | Undecided → Wishlist |
Thank you for taking the time to report this bug and helping to make Ubuntu better.
The GTK L&F has a few known issues and is not enabled by default. Please see bug #183139.
You might try adding those properties to either /etc/java- 7-openjdk/ swing.propertie s /etc/java- 8-openjdk/ swing.propertie s, one per line without the "-D", as in:
awt.useSystemAA FontSettings= on f=com.sun. java.swing. plaf.gtk. GTKLookAndFeel formlaf= com.sun. java.swing. plaf.gtk. GTKLookAndFeel
swing.aatext=true
swing.defaultla
swing.crossplat
Be aware that the application you are trying to run might override those settings on its own, if so that would require you to edit the application configuration files.