From 667e0aa13c6bf303df425087c30dfa65b1d76e7a Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 11 Feb 2009 13:25:16 +0000 Subject: [PATCH] Workaround for bug in MacOSX java in AboutFrame git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@344 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/ui/AboutFrame.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/java/davmail/ui/AboutFrame.java b/src/java/davmail/ui/AboutFrame.java index fdc77e5e..fbb35afd 100644 --- a/src/java/davmail/ui/AboutFrame.java +++ b/src/java/davmail/ui/AboutFrame.java @@ -1,7 +1,7 @@ package davmail.ui; -import davmail.tray.DavGatewayTray; import davmail.DavGateway; +import davmail.tray.DavGatewayTray; import javax.imageio.ImageIO; import javax.swing.*; @@ -13,8 +13,8 @@ import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; -import java.net.URL; import java.net.URISyntaxException; +import java.net.URL; /** * About frame @@ -40,9 +40,13 @@ public class AboutFrame extends JFrame { DavGatewayTray.error("Unable to create icon", e); } - jEditorPane = new JEditorPane("text/html", getContent()); - StyleSheet stylesheet = ((HTMLEditorKit) jEditorPane.getEditorKit()).getStyleSheet(); + jEditorPane = new JEditorPane(); + HTMLEditorKit htmlEditorKit = new HTMLEditorKit(); + StyleSheet stylesheet = htmlEditorKit.getStyleSheet(); stylesheet.addRule("body { font-size:small;font-family: " + jEditorPane.getFont().getFamily() + "}"); + jEditorPane.setEditorKit(htmlEditorKit); + jEditorPane.setContentType("text/html"); + jEditorPane.setText(getContent()); jEditorPane.setEditable(false); jEditorPane.setOpaque(false);