How to include images in a JEditorPane whose editor kit is HTMLEditor Kit ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   z_chen
Posted On:   Wednesday, November 20, 2002 12:48 AM

The Code:

			
String html = "




"



JEditorPane ep = new JEditorPane();

HTMLEditorKit htmlKit = new HTMLEditorKit();

ep.setEditorKit(htmlKit);

ep.setText(html);





Anyone help?

Re: How to include images in a JEditorPane whose editor kit is HTMLEditor Kit ?

Posted By:   z_chen  
Posted On:   Wednesday, November 20, 2002 01:22 AM

thanks all

but i found an answer


((javax.swing.text.html.HTMLDocument)ep.getDocument()).setBase(url);

where url is of type java.net.URL
About | Sitemap | Contact