Re: Urgent - JTextPane - How to read and write the data from JTextPane including the Style of each data Element
Posted By:
Anonymous
Posted On:
Monday, June 11, 2001 12:31 AM
hello,
JTextPane's contents are stored in its document.(i.e its model).You can retrieve its contents by simplify getting its document..ie
JTextPane text=new JTextPane();
StyledDocument=doc=text.getStyledDocument();
now, 'text' contents are stored in this 'doc'.If u like to set this 'doc' to another JTextPane,u can do the following...
JTextPane text2=new JTextPane();
text.setStyledDocument(doc);
thank yoy