Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic