permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes JEditorPane and css - will a custom EditorKit make it work? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JEditorPane and css - will a custom EditorKit make it work?" Watch "JEditorPane and css - will a custom EditorKit make it work?" New topic
Author

JEditorPane and css - will a custom EditorKit make it work?

Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
Hi there

I am working on generating html from text pages with the final part being to place them in a JEditorPane.

I am using StyleSheets and when I look at a hyperlink in IE, it is not underlined. But when I look at the same hyperlink in the JEditorPane, it is underlined.

Does the JEditorPane interpret css in a different way? I have looked on the internet and found a site explaining how to use the HTMLEditor and EditorKits but I could not find out if using them will solve this.

Any help would be much appreciated.
Many kind regards,
Rachel
Jez Nicholson
Ranch Hand

Joined: Oct 01, 2002
Posts: 39
JEditorPane only supports css to a limited extent. It seems that it's styling things keyed on an HTML.Tag.A, i.e. it will apply A{text-decoration:none} but not A:link{text-decoration:none}

If you really need to chase it then ask on http://www.javadesktop.org/forums/category.jspa?categoryID=2 and someone from the Swing team may reply
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JEditorPane and css - will a custom EditorKit make it work?
 
Similar Threads
Question about hyperlink...
opening link in new window
Problem in html type of data in JEditorPane
Hyperlinks in JEditorPane
How to get the Underlined text in JTextPane