Skip to content

Commit 729da9e

Browse files
hansonrhansonr
authored andcommitted
adds javax.swing.SwingUtiliteis.getUnwrappedParent
1 parent 2e48a03 commit 729da9e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sources/net.sf.j2s.java.core/src/javax/swing/SwingUtilities.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,4 +2041,18 @@ static void updateRendererOrEditorUI(Object rendererOrEditor) {
20412041
SwingUtilities.updateComponentTreeUI(component);
20422042
}
20432043
}
2044+
2045+
/**
2046+
* Java 1.7
2047+
* @param component
2048+
* @return
2049+
*/
2050+
public static Container getUnwrappedParent(Component component) {
2051+
Container parent = component.getParent();
2052+
while(parent instanceof JLayer) {
2053+
parent = parent.getParent();
2054+
}
2055+
return parent;
2056+
}
2057+
20442058
}

0 commit comments

Comments
 (0)