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

With GTK L&F JDesktopPane substitutes set desktop manager

    Details

    • Subcomponent:
    • Resolved In Build:
      b114
    • CPU:
      generic
    • OS:
      linux
    • Verification:
      Verified

      Description

      Testcase
      api/javax_swing/JDesktopPane/descriptions.html#getset[JDesktopPane2002]
      fails on

      Platforms: Linux, Solaris
      JDK: 6, 7
      L&F: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

      Methods JDesktopPane.setDesktopManager/getDesktopManager are not consistent under GTK L&F
      Please see the following code sample:
      -----------------------------------------------------------------------------------------
      import javax.swing.*;

      public class TestJDPane {

          public static void main(String[] args) {
              JDesktopPane desktopPane = new JDesktopPane();
              DesktopManager installed = new DefaultDesktopManager();
              desktopPane.setDesktopManager(installed);
              DesktopManager returned = desktopPane.getDesktopManager();
              if (!returned.equals(installed)) {
                  System.out.println("installed = " + installed);
                  System.out.println("returned = " + returned);
              }
          }
      }
      -----------------------------------------------------------------------------------------
      with -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
      the output will be like the following

      installed = javax.swing.DefaultDesktopManager@82764b
      returned = javax.swing.plaf.synth.SynthDesktopPaneUI$SynthDesktopManager@12452e8

        Attachments

          Activity

            People

            • Assignee:
              peterz Peter Zhelezniakov (Inactive)
              Reporter:
              dbessono Dmitry Bessonov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: