getText: ((JTextComponent) -> string) & ((JTextComponent, number, number) -> string)
(JTextComponent) -> string: The whole text ("" when empty).
(JTextComponent, number, number) -> string: length characters (UTF-16 units) from offset; a range outside the text raises BadLocationException.
setText: (JTextComponent, string?) -> ()
Replaces the text: the old text's removal, then the new text's insertion, each heard by the document's listeners before this returns. nil or "" empties it.
getSelectedText: (JTextComponent) -> string?
The selected text, or nil without a selection.
setSelectedTextColor: (JTextComponent, Color?) -> ()
The selected text's colour; nil gives the look's back.