if (frame != null) {
System.out.println("SwingConsole is running. Only one SwingConsole can run at this time.");
return;
}
}
SwingTextScreenConsoleManager cm = new SwingTextScreenConsoleManager();
TextScreenConsoleManager manager = getParentManager();
if (manager != null) {
cm.setParent(manager);
}
TextConsole console = cm.createConsole(
null,
(ConsoleManager.CreateOptions.TEXT |
ConsoleManager.CreateOptions.SCROLLABLE));
new Thread(new CommandShell(console), "SwingConsoleCommandShell").start();
synchronized (SwingConsole.class) {
frame = cm.getFrame();
}
frame.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
synchronized (SwingConsole.class) {