File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JEditorPane weirdo 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 weirdo" Watch "JEditorPane weirdo" New topic

JEditorPane weirdo

Chin Loong
Ranch Hand

Joined: Nov 19, 2001
Posts: 45
hi there guys,
need a bit of help. I'm using JEditorPane to display some text to be printed in content-type "text/html". The problem is, even though I specified the font size in the tag
[font size="-1"]
even though the font changes size accordingly, the height of the space that the font contained remains the same. To put it in simple terms, at first, the fonts were quite big, and my JEditorPane could only fit a certain number of lines (let's say 10). when I use [font] tag to make the fonts small, the fonts became small as expected *but* the JEditorPane *still* can only fit 10 lines. The height of the font itself became small, but when I click on the font, I noticed that the caret's size is still huge (only the character size change, the row size remains the same) and there's huge space in between rows. Now, how do I change that size?
Pls help, thanks
Chin Loong
Ranch Hand

Joined: Nov 19, 2001
Posts: 45
can anybody help?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

I'm not having a problem with font sizes in the program below that I made to test for the problem you are describing. I'm using Java 1.3.1...

Could it be a problem with the HTML document you are opening?


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: JEditorPane weirdo
jQuery in Action, 3rd edition