-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: client-libs
-
Fix Understood
-
generic
-
generic
Add the following helper method in Util
private static Component findComponent(final Container container,
final Predicate<Component> predicate) {
for (Component child : container.getComponents()) {
if (predicate.test(child)) {
return child;
}
if (child instanceof Container cont && cont.getComponentCount() > 0) {
Component result = findComponent(cont, predicate);
if (result != null) {
return result;
}
}
}
return null;
}
private static Component findComponent(final Container container,
final Predicate<Component> predicate) {
for (Component child : container.getComponents()) {
if (predicate.test(child)) {
return child;
}
if (child instanceof Container cont && cont.getComponentCount() > 0) {
Component result = findComponent(cont, predicate);
if (result != null) {
return result;
}
}
}
return null;
}
- blocks
-
JDK-8371364 Refactor javax/swing/JFileChooser/FileSizeCheck.java to use Util.findComponent()
-
- Open
-
-
JDK-8371365 Update /javax/swing/JFileChooser/bug4759934.java to use Util.findComponent()
-
- Open
-
- links to
-
Review(master)
openjdk/jdk/27944