How can I display RTF text in a JTextpane or JEditorPane?

Sandip Chitale


String rtfText = // get RTF text somehow ;
editorPane.setContentType("text/rtf");
editorPane.setText(rtfText);
or
editorPane.setPage(RTF_URL);

As per the JDK1.2 documentation itself the rtf implementation is not really complete and robust. Plese see -

file:///C|/jdk1.2/docs/api/javax/swing/text/rtf/RTFEditorKit.html

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact