aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Setting a JEditorPane to use JLabel's default font when using HTML 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 "Setting a JEditorPane to use JLabel Watch "Setting a JEditorPane to use JLabel New topic
Author

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

Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
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

Joined: Jan 05, 2005
Posts: 140
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting a JEditorPane to use JLabel's default font when using HTML
 
Similar Threads
HTML in JEditorPane
JEditorPane
Open a Web Page inside a jDesktopPane
JEditorPane weirdo
Setting Defferent Color Of Alphabet In A String