isolating the viewable text in a scrollpane

Hi,

I have a JScrollPane, JTextArea, and DefaultStyledDocument.

My problem is that JTextArea.getText() is too much. I would like to read only the viewable text.

I have been messing with getViewport, AccessibleContent, getText(int, int), loads of very hopeful guesses, and I'm just not succeeding!

If it is solved, the viewable text will be edited, so knowing its start and end position in the document might be important.

Thanks very much for reading!

[489 byte] By [stormbinda] at [2007-11-27 6:31:05]
# 1
maybe? http://forum.java.sun.com/thread.jspa?threadID=5163597&messageID=9625138
Michael_Dunna at 2007-7-12 17:55:56 > top of Java-index,Desktop,Core GUI APIs...