Project

General

Profile

Actions

Bug #14481

closed

OpenJDK 11 UIManager.getSystemLookAndFeelClassName() returns Motif not GTK

Added by Bill Chatfield about 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
OI-Userland
Target version:
Start date:
2023-11-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
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 about 2 years 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 about 2 years ago

These environment variables identify the desktop environment being used:

XDG_CURRENT_DESKTOP=MATE
XDG_SESSION_DESKTOP=mate
Actions #4

Updated by Bill Chatfield about 2 years ago

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

Actions #5

Updated by Franklin Ronald 5 months ago

PR Submited: https://github.com/OpenIndiana/oi-userland/pull/15037

I will wait for the review to make any necessary changes.

Actions #6

Updated by Franklin Ronald 5 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 60
  • Difficulty changed from Medium to Bite-size
Actions #7

Updated by Franklin Ronald 5 months ago

  • Assignee changed from OI Userland to Franklin Ronald
Actions #8

Updated by Franklin Ronald 5 months ago

  • Start date set to 2023-11-27
Actions #9

Updated by Franklin Ronald 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 60 to 100

Fixed and merged.

Actions

Also available in: Atom PDF