Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scaling font in JEditorPane HTML rendering

 
Carey Brown
Ranch Hand
Pie
Posts: 1335
15
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java-sl.com/Scale_In_JEditorPane.html
Hope this helps

Regards,
Stas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic