It is still an issue in 12.04. The following program:
import javax.swing.UIManager;
public class Test {
public static void main(String[] args) { System.out.println("System: " + UIManager.getSystemLookAndFeelClassName()); System.out.println("CrossPlatform: " + UIManager.getCrossPlatformLookAndFeelClassName());
for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) System.out.println("Installed: " + laf);
}
}
As you see, the system LaF is still Metal. Under Gnome, it is GTK.
I am aware that for KDE, a QtLookAndFeel would be the best match, but since no such thing exist, UIManager.getSystemLookAndFeelClassName() should default to GTK as the closest match (especially since by default, KDE sets the GTK style to QtCurve and the fonts to the ones used by KDE applications).
It is still an issue in 12.04. The following program:
import javax.swing. UIManager;
public class Test {
System. out.println( "System: " + UIManager. getSystemLookAn dFeelClassName( ));
System. out.println( "CrossPlatform: " + UIManager. getCrossPlatfor mLookAndFeelCla ssName( )); LookAndFeelInfo laf : UIManager. getInstalledLoo kAndFeels( ))
System. out.println( "Installed: " + laf);
public static void main(String[] args) {
for (UIManager.
}
}
prints
System: javax.swing. plaf.metal. MetalLookAndFee l plaf.metal. MetalLookAndFee l UIManager$ LookAndFeelInfo [Metal javax.swing. plaf.metal. MetalLookAndFee l] UIManager$ LookAndFeelInfo [Nimbus com.sun. java.swing. plaf.nimbus. NimbusLookAndFe el] UIManager$ LookAndFeelInfo [CDE/Motif com.sun. java.swing. plaf.motif. MotifLookAndFee l] UIManager$ LookAndFeelInfo [GTK+ com.sun. java.swing. plaf.gtk. GTKLookAndFeel]
CrossPlatform: javax.swing.
Installed: javax.swing.
Installed: javax.swing.
Installed: javax.swing.
Installed: javax.swing.
As you see, the system LaF is still Metal. Under Gnome, it is GTK.
I am aware that for KDE, a QtLookAndFeel would be the best match, but since no such thing exist, UIManager. getSystemLookAn dFeelClassName( ) should default to GTK as the closest match (especially since by default, KDE sets the GTK style to QtCurve and the fonts to the ones used by KDE applications).