File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2222import java .awt .Window ;
2323import java .beans .PropertyChangeListener ;
2424import java .beans .PropertyChangeSupport ;
25+ import java .util .Arrays ;
26+ import java .util .List ;
27+ import java .util .stream .Collectors ;
2528import javax .swing .JComponent ;
2629import javax .swing .JDialog ;
2730import javax .swing .JFrame ;
@@ -87,6 +90,8 @@ public void applyChanges() {
8790 JDialog .setDefaultLookAndFeelDecorated (isUseWindowDecorations );
8891 for (Window w : Window .getWindows ()) {
8992 if (w .isDisplayable () && (w instanceof JFrame || w instanceof JDialog )) {
93+ List <Window > childs = Arrays .stream (w .getOwnedWindows ())
94+ .filter (Window ::isVisible ).collect (Collectors .toList ());
9095 w .dispose ();
9196 if (w instanceof JFrame ) {
9297 ((JFrame ) w ).setUndecorated (isUseWindowDecorations );
@@ -98,6 +103,7 @@ public void applyChanges() {
98103 isUseWindowDecorations ? JRootPane .FRAME : JRootPane .NONE );
99104 }
100105 w .setVisible (true );
106+ childs .forEach (child -> child .setVisible (true ));
101107 }
102108 }
103109 }
You can’t perform that action at this time.
0 commit comments