I get Document object from JTextPane, which contains method remove, but specific number of chars textPane.getDocument().remove(begin,end). I would like to remove whole first line.
I get Document object from JTextPane , which contains method remove , but specific
Share
The following shows how to remove the first line (Element) of a JTextPane if you are considering lines “things that end in a newline”. If you have fancier content in your Document, you may need to do something more elaborate