File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
src/main/java/org/scijava/ui/swing/options Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,7 @@ public void run() {
101101
102102 @ Override
103103 public void run () {
104- // FIXME: Get all windows from UIService rather than just app.
105- final UserInterface ui = uiService .getDefaultUI ();
106- final SwingApplicationFrame swingAppFrame =
107- (SwingApplicationFrame ) ui .getApplicationFrame ();
108- SwingUtilities .updateComponentTreeUI (swingAppFrame );
109- swingAppFrame .pack ();
104+ refreshSwingComponents ();
110105 }
111106 });
112107 }
@@ -149,6 +144,18 @@ protected void initLookAndFeel() {
149144 lookAndFeelItem .setChoices (lookAndFeelChoices );
150145 }
151146
147+ // -- Helper methods --
148+
149+ /** Tells all known Swing components to change to the new Look & Feel. */
150+ private void refreshSwingComponents () {
151+ // FIXME: Get all windows from UIService rather than just app.
152+ final UserInterface ui = uiService .getDefaultUI ();
153+ final SwingApplicationFrame swingAppFrame =
154+ (SwingApplicationFrame ) ui .getApplicationFrame ();
155+ SwingUtilities .updateComponentTreeUI (swingAppFrame );
156+ swingAppFrame .pack ();
157+ }
158+
152159 // -- Deprecated methods --
153160
154161 @ Deprecated
You can’t perform that action at this time.
0 commit comments