-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b114
-
generic
-
linux
-
Verified
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
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