/** * Creates a new JSInternalConsole. */ public JSInternalConsole(String name) { super(name, true, false, true, true); consoleTextArea = new ConsoleTextArea(null); consoleTextArea.setRows(24); consoleTextArea.setColumns(80); JScrollPane scroller = new JScrollPane(consoleTextArea); setContentPane(scroller); pack(); addInternalFrameListener(new InternalFrameAdapter() { @Override public void internalFrameActivated(InternalFrameEvent e) { // hack if (consoleTextArea.hasFocus()) { consoleTextArea.getCaret().setVisible(false); consoleTextArea.getCaret().setVisible(true); } } }); }