retrieving data from JTextPane
Hi Forum,
I want to get data from JTextPane i an using
tpAllMessages.getDocument().getText(tpAllMessages.getSelectionStart(),tpAllMessages.getSelectionEnd());
and
tpAllMessages.getText();
but it is not working throwing badlocation exception.
if you can help,
thanx
# 1
> but it is not working throwing badlocation exception.
Then fix your offsets.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the code retains its original formatting.