File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/main/java/org/scijava/ui/swing Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,15 @@ protected void createUI() {
249249 // Before we create any UI components, initialize the Look and Feel.
250250 if (lafService != null ) lafService .initLookAndFeel ();
251251
252+ // NB: Create the console first, because if the Look and Feel
253+ // is busted, it will trigger an infinite loop during console
254+ // initialization, which the SwingConsolePane is smart enough to
255+ // catch and throw a RuntimeException in response, thereby
256+ // avoiding any subsequent output shenanigans past this point.
257+ if (!Boolean .getBoolean (ConsolePane .NO_CONSOLE_PROPERTY )) {
258+ consolePane = new SwingConsolePane (getContext ());
259+ }
260+
252261 final JMenuBar menuBar = createMenus ();
253262
254263 appFrame = new SwingApplicationFrame (appService .getApp ().getTitle ());
@@ -257,10 +266,6 @@ protected void createUI() {
257266 toolBar = new SwingToolBar (getContext ());
258267 statusBar = new SwingStatusBar (getContext ());
259268
260- if (!Boolean .getBoolean (ConsolePane .NO_CONSOLE_PROPERTY )) {
261- consolePane = new SwingConsolePane (getContext ());
262- }
263-
264269 systemClipboard = new AWTClipboard ();
265270
266271 setupAppFrame ();
You can’t perform that action at this time.
0 commit comments