diff options
Diffstat (limited to 'netx/net/sourceforge/jnlp/about')
-rw-r--r-- | netx/net/sourceforge/jnlp/about/AboutDialog.java | 16 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/about/HTMLPanel.java | 8 |
2 files changed, 17 insertions, 7 deletions
diff --git a/netx/net/sourceforge/jnlp/about/AboutDialog.java b/netx/net/sourceforge/jnlp/about/AboutDialog.java index 136b53e..8a14384 100644 --- a/netx/net/sourceforge/jnlp/about/AboutDialog.java +++ b/netx/net/sourceforge/jnlp/about/AboutDialog.java @@ -40,6 +40,7 @@ package net.sourceforge.jnlp.about; import static net.sourceforge.jnlp.runtime.Translator.R; import java.awt.Dimension; +import java.awt.Frame; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; @@ -48,7 +49,7 @@ import java.io.IOException; import java.net.URL; import javax.swing.JButton; -import javax.swing.JFrame; +import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.SwingUtilities; import javax.swing.UIManager; @@ -64,17 +65,17 @@ public class AboutDialog extends JPanel implements Runnable, ActionListener { private static final String copying_url = "/net/sourceforge/jnlp/resources/COPYING.html"; private static final String news_url = "/net/sourceforge/jnlp/resources/NEWS.html"; - private JFrame frame; + private JDialog frame; private JPanel contentPane; private HTMLPanel aboutPanel, authorsPanel, newsPanel, changelogPanel, copyingPanel; private JButton aboutButton, authorsButton, newsButton, changelogButton, copyingButton; - public AboutDialog() throws IOException { + public AboutDialog(boolean modal) throws IOException { super(new GridBagLayout()); - frame = new JFrame("About IcedTea-Web"); + frame = new JDialog((Frame)null, R("AboutDialogueTabAbout") + " IcedTea-Web", modal); frame.setContentPane(this); - frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); URL res_about = getClass().getResource(about_url); URL res_authors = getClass().getResource(authors_url); @@ -186,7 +187,10 @@ public class AboutDialog extends JPanel implements Runnable, ActionListener { } public static void display() throws IOException { - SwingUtilities.invokeLater(new AboutDialog()); + display(false); + } + public static void display(boolean modal) throws IOException { + SwingUtilities.invokeLater(new AboutDialog(modal)); } } diff --git a/netx/net/sourceforge/jnlp/about/HTMLPanel.java b/netx/net/sourceforge/jnlp/about/HTMLPanel.java index 67c1733..c68321a 100644 --- a/netx/net/sourceforge/jnlp/about/HTMLPanel.java +++ b/netx/net/sourceforge/jnlp/about/HTMLPanel.java @@ -56,7 +56,13 @@ public class HTMLPanel extends JPanel { public HTMLPanel(URL url, String identifier) throws IOException { super(new BorderLayout()); id = identifier; - JEditorPane pane = new JEditorPane(url); + JEditorPane pane = new JEditorPane(); + try{ + pane = new JEditorPane(url); + } catch(Exception ex){ + //no need to have invalid url fatal + ex.printStackTrace(); + } pane.setContentType("text/html"); pane.setEditable(false); pane.addHyperlinkListener(new UrlHyperlinkListener()); |