8057184: JCK8's api/javax_swing/JDesktopPane/descriptions.html#getset failed with GTKLookAndFeel on Linux and Solaris
authoralexsch
Fri, 05 Sep 2014 12:57:24 +0400
changeset 26610 fbd0412506d3
parent 26609 de18f570018c
child 26611 3fe7ce8b26da
8057184: JCK8's api/javax_swing/JDesktopPane/descriptions.html#getset failed with GTKLookAndFeel on Linux and Solaris Reviewed-by: ant, azvegint
jdk/src/java.desktop/share/classes/javax/swing/JDesktopPane.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/JDesktopPane.java	Thu Sep 04 09:32:08 2014 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JDesktopPane.java	Fri Sep 05 12:57:24 2014 +0400
@@ -43,6 +43,7 @@
 import java.beans.PropertyVetoException;
 import java.util.Set;
 import java.util.TreeSet;
+import java.util.LinkedHashSet;
 /**
  * A container used to create a multiple-document interface or a virtual desktop.
  * You create <code>JInternalFrame</code> objects and add them to the
@@ -271,7 +272,7 @@
 
     private static Collection<JInternalFrame> getAllFrames(Container parent) {
         int i, count;
-        Collection<JInternalFrame> results = new ArrayList<JInternalFrame>();
+        Collection<JInternalFrame> results = new LinkedHashSet<>();
         count = parent.getComponentCount();
         for (i = 0; i < count; i++) {
             Component next = parent.getComponent(i);