System_Error
Jan 2nd, 2005, 03:42 PM
I have this code that is suppose to append text to a JTextPane, using the Document method insertString(). I can't seem to get the attribute argument right, so maybe one of you can point me in the right direction...
Here is the one line of code giving me problems, just at the attribute argument
doc.insertString(lastPosition,s,(AttributeSet)null);
doc == myTextPane.getDocument
last pos == myTextPane.getSelectionEnd()
and s == the string to be inserted
It's just the atrributes part I can't seem to get working..
Any ideas?
Note: I hope im not anyoing anyone by positing to many questions, but it just seems like I have one problem after the next.
Here is the one line of code giving me problems, just at the attribute argument
doc.insertString(lastPosition,s,(AttributeSet)null);
doc == myTextPane.getDocument
last pos == myTextPane.getSelectionEnd()
and s == the string to be inserted
It's just the atrributes part I can't seem to get working..
Any ideas?
Note: I hope im not anyoing anyone by positing to many questions, but it just seems like I have one problem after the next.