Project

General

Profile

Actions

Bug #14481

open

OpenJDK 11 UIManager.getSystemLookAndFeelClassName() returns Motif not GTK

Added by Bill Chatfield 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

UIManager.getSystemLookAndFeelClassName() currently returns "com.sun.java.swing.plaf.motif.MotifLookAndFeel". This is incorrect because OpenIndiana desktop is Mate, which is based on GTK+.

If the Java look and feel is set to GTK+, the Java app looks consistent with the rest of the desktop apps.

UIManager.getSystemLookAndFeelClassName() should return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel".


Files

PlafLister.java (730 Bytes) PlafLister.java Java code to list all pluggable look and feels and identify the system look and feel Bill Chatfield, 2022-02-07 05:54 AM
PlafLister.class (1.06 KB) PlafLister.class Runnable class to list all look and feels and identify the system look and feel Bill Chatfield, 2022-02-07 05:56 AM
lsplaf.sh (32 Bytes) lsplaf.sh script to run PlafLister Bill Chatfield, 2022-02-07 05:58 AM
Actions #2

Updated by Bill Chatfield 5 months ago

This output shows that the wrong system look and feel is being returned:

bill@andrewsarchus:~/git/utils/java/classes$ ./lsplaf.sh 
Metal   javax.swing.plaf.metal.MetalLookAndFeel
Nimbus  javax.swing.plaf.nimbus.NimbusLookAndFeel
CDE/Motif       com.sun.java.swing.plaf.motif.MotifLookAndFeel (System)
GTK+    com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Actions #3

Updated by Bill Chatfield 5 months ago

These environment variables identify the desktop environment being used:

XDG_CURRENT_DESKTOP=MATE
XDG_SESSION_DESKTOP=mate
Actions #4

Updated by Bill Chatfield 5 months ago

The Target version should be 2021.10. I can't find a way to change it now.

Actions

Also available in: Atom PDF