public void showResult(JEditorPane txt, String result) { try { if (txt.getText().length() == 0) { appendHTML(txt, result); txt.setSelectionStart(txt.getText().length()); txt.setSelectionEnd(txt.getText().length() - 1); } else { if (txt.getText().length() > MAX_LOG_SIZE) { txt.setSelectionStart(0); txt.setSelectionStart(txt.getText().length() - MAX_LOG_SIZE); txt.replaceSelection(""); } txt.setSelectionStart(txt.getText().length()); appendHTML(txt, result); txt.setSelectionEnd(txt.getText().length()); } } catch (Exception e) { e.printStackTrace(); } }
public String getParseText() { return editor.getText(); }
public String getTextString() { return editor.getText(); }