Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JEditorPane Line spacing help

843806Jun 22 2009 — edited Jun 22 2009
I've done a few searches on here and google, and not found an answer yet, is it possible to alter the line spacing of the text in a JEditorPane, when running my app under Linux (Ubuntu), the spacing is way too much, altering the font seems to help a bit. I'm displaying HTML inside it, mainly plain text, but sometimes <A tag links.

Heres a picture to demonstrate, the same JEditorPane displaying the same text on Windows, Mac and Linux...
[View picture|http://files.getdropbox.com/u/704221/JeditorPane.jpg]

As you can see on Linux, theres more line spacing, and its switched on the vertical scroll bar, so if I could programatically tweek the line spacing depending on the OS, that would really help.

Or is there another control I could use? It needs to display HTML with hyperlinks and images <img tags.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2009
Added on Jun 22 2009
1 comment
789 views