pane.setEditable(true);
pane.setAutoscrolls(true);
pane.setLineTerm(System.getProperty("line.separator"));
overwriteCaret = new OverwriteCaret();
insertCaret = pane.getCaret();
pane.setCaret(insertMode ? insertCaret : overwriteCaret);
pane.setCaretPosition(0);
}