Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177960

Deprecate the Swing Motif Look and Feel and document it as unsupported on macOS

    Details

    • Subcomponent:
    • Resolved In Build:
      b15
    • CPU:
      x86
    • OS:
      os_x
    • Verification:
      Not verified

      Description

      This is a request to deprecate the Swing Motif Look and Feel, and document it as unsupported on macOS platform in jdk13.

      The Motif L&F has long been part of the Swing implementation shipped with the JDK, although unlike L&Fs such as Metal and Nimbus it is not exposed in Java APIs and not part of the Java SE specification. Because it is an internal class, not exported from the java.desktop module, applications cannot instantiate it directly in JDK 9 and later, but is still accessible via command line option or passing the class name to the method "UIManager.setLookAndFeel(String className)".

      This look and feel was implemented as the System look and feel for the Solaris platform at time when the CDE/Motif environment was used the principal supported desktop environment. Since then it has been largely superseded by the GTK L&F, both on Solaris, and on Linux versions.

      But it was placed in shared code and provided and supported on all platforms including Windows and later MacOS. Applications can enumerate the installed L&Fs via standard API, and retrieve its class name and instantiate it. It has also been documented in tutorials, guides etc.

      However its use as a cross-platform L&F is very limited applications are much more likely to use one of the true cross-platform look and feels which are exposed in Java API, ie

          Ocean - reworked version of Metal L&F in jdk5 https://docs.oracle.com/javase/1.5.0/docs/guide/swing/1.5/index.html#swingMajor
          Nimbus - was added as a Public API in jdk7 https://openjdk.java.net/projects/jdk7/features/#f244

      Since it is superseded as a system L&F and has limited use and additionally as a L&F is very dated visually, we would like to discourage further use.

      Additionally its availability on MacOS is the origin of some JCK issue, since AWT components on Mac are implemented using Swing.

      As of jdk13 in the release notes we would like to document this L&F as unsupported on macOS, and deprecate it in the source code

      In some future release we may deprecate it for removal and subsequently remove it completely, or we may remove it from the shared code to stop distributing it on Windows and macOS. These are mentioned here to give the most possible notice of such possible additional changes.

        Attachments

        1. default.png
          88 kB
          Dmitry Bessonov
        2. motif.png
          79 kB
          Dmitry Bessonov
        3. ScrollPaneTest.java
          2 kB
          Dmitry Bessonov
        4. SPaneTest.jpg
          347 kB
          Tony Li
        5. SPaneTest0001.jpg
          268 kB
          Tony Li

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                tonyli Tony Li
              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: