/** * Post a message to the assembler display * * @param message String to append to assembler display text */ public void postMarsMessage(String message) { assemble.append(message); // can do some crude cutting here. If the document gets "very large", // let's cut off the oldest text. This will limit scrolling but the limit // can be set reasonably high. if (assemble.getDocument().getLength() > MAXIMUM_SCROLLED_CHARACTERS) { try { assemble.getDocument().remove(0, NUMBER_OF_CHARACTERS_TO_CUT); } catch (BadLocationException ble) { // only if NUMBER_OF_CHARACTERS_TO_CUT > MAXIMUM_SCROLLED_CHARACTERS } } assemble.setCaretPosition(assemble.getDocument().getLength()); setSelectedComponent(assembleTab); }