This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Scaling font in JEditorPane HTML rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Scaling font in JEditorPane HTML rendering" Watch "Scaling font in JEditorPane HTML rendering" New topic
Author

Scaling font in JEditorPane HTML rendering

Carey Brown
Ranch Hand

Joined: Nov 19, 2001
Posts: 173

The problem that I'm running into is that an HTML file that I'm trying to show in a JEditorPane appears with a smaller font size than when I view the file in Internet Explorer or Firefox. I created a JEditorPaneZoom class (see below) which does scale the text correctly, however, the centering of the text is off and the text doesn't wrap correctly. Anybody out there that's had success?



Thanks,
Carey
Stanislav Lapitsky
Ranch Hand

Joined: Dec 01, 2009
Posts: 53
http://java-sl.com/Scale_In_JEditorPane.html
Hope this helps

Regards,
Stas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scaling font in JEditorPane HTML rendering
 
Similar Threads
I am trying to create dynamic text
Create images of a JTextPane's content
Swing related
Graphics rotation / translation / affinetransform problem
Java Print