Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting a JEditorPane to use JLabel's default font when using HTML

 
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

Ok, I've got a bit of a problem, and maybe I'm overlooking something obvious.

I need to use a JEditorPane, as far as I know, to be able to have clickable links in the midst of non-link text.

However, JEditorPane is using a different font than the typical JLabel font when I do this.

How do I get the text (including the "a href" links) in the JEditorPane to use the same font as a typical, non-HTML JLabel would use?

Thanks in advance.
 
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey - well, it took DAYS of searching, but finally found something buried on the internet that explains how to do this...

So, if anyone else ever runs into this problem, take a look at the article: Make JEditorPane use the system font
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic