This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 170

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
 
Don't get me started about those stupid light bulbs.
 
subject: Scaling font in JEditorPane HTML rendering
 
Similar Threads
Swing related
I am trying to create dynamic text
Java Print
Graphics rotation / translation / affinetransform problem
Create images of a JTextPane's content