File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
src/java.desktop/share/classes/javax/swing/plaf/basic Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -2243,23 +2243,20 @@ public void eventDispatched(AWTEvent ev) {
2243
2243
}
2244
2244
}
2245
2245
}
2246
- /* Activate a JInternalFrame if necessary. */
2247
- if (eventID == MouseEvent .MOUSE_PRESSED ) {
2248
- Object object = ev .getSource ();
2249
- if (!(object instanceof Component )) {
2250
- return ;
2251
- }
2252
- Component component = (Component )object ;
2253
- if (component != null ) {
2254
- Component parent = component ;
2255
- while (parent != null && !(parent instanceof Window )) {
2256
- if (parent instanceof JInternalFrame ) {
2246
+
2247
+ // Activate a JInternalFrame if necessary.
2248
+ if (eventID == MouseEvent .MOUSE_PRESSED
2249
+ && ev .getSource () instanceof Component parent ) {
2250
+ while (parent != null && !(parent instanceof Window )) {
2251
+ if (parent instanceof JInternalFrame internalFrame ) {
2252
+ try {
2257
2253
// Activate the frame.
2258
- try { (( JInternalFrame ) parent ) .setSelected (true ); }
2259
- catch (PropertyVetoException e1 ) { }
2254
+ internalFrame .setSelected (true );
2255
+ } catch (PropertyVetoException ignored ) {
2260
2256
}
2261
- parent = parent .getParent ();
2262
2257
}
2258
+
2259
+ parent = parent .getParent ();
2263
2260
}
2264
2261
}
2265
2262
}
You can’t perform that action at this time.
0 commit comments