diff options
author | Andrew Azores <[email protected]> | 2013-07-25 15:42:41 -0400 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2013-07-25 15:42:41 -0400 |
commit | d6640132c7d1cc6fe2849e26a8d3260d468d726f (patch) | |
tree | 7e78a5f8fc9c075cd2031bf92d4544e6d0746486 /netx/net/sourceforge/jnlp | |
parent | c3bd36b237a7e2fa69c2dc919d87f2b11bd3c332 (diff) |
Cleaned up "throws IOException" from HTMLPanel constructor and try/catches elsewhere which handled this
Diffstat (limited to 'netx/net/sourceforge/jnlp')
5 files changed, 13 insertions, 29 deletions
diff --git a/netx/net/sourceforge/jnlp/about/AboutDialog.java b/netx/net/sourceforge/jnlp/about/AboutDialog.java index 8a14384..f043113 100644 --- a/netx/net/sourceforge/jnlp/about/AboutDialog.java +++ b/netx/net/sourceforge/jnlp/about/AboutDialog.java @@ -45,7 +45,6 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.io.IOException; import java.net.URL; import javax.swing.JButton; @@ -70,7 +69,7 @@ public class AboutDialog extends JPanel implements Runnable, ActionListener { private HTMLPanel aboutPanel, authorsPanel, newsPanel, changelogPanel, copyingPanel; private JButton aboutButton, authorsButton, newsButton, changelogButton, copyingButton; - public AboutDialog(boolean modal) throws IOException { + public AboutDialog(boolean modal) { super(new GridBagLayout()); frame = new JDialog((Frame)null, R("AboutDialogueTabAbout") + " IcedTea-Web", modal); @@ -186,10 +185,11 @@ public class AboutDialog extends JPanel implements Runnable, ActionListener { frame.setVisible(true); } - public static void display() throws IOException { + public static void display() { display(false); } - public static void display(boolean modal) throws IOException { + + public static void display(boolean modal) { SwingUtilities.invokeLater(new AboutDialog(modal)); } diff --git a/netx/net/sourceforge/jnlp/about/HTMLPanel.java b/netx/net/sourceforge/jnlp/about/HTMLPanel.java index c68321a..8587a3e 100644 --- a/netx/net/sourceforge/jnlp/about/HTMLPanel.java +++ b/netx/net/sourceforge/jnlp/about/HTMLPanel.java @@ -53,13 +53,13 @@ public class HTMLPanel extends JPanel { private String id; - public HTMLPanel(URL url, String identifier) throws IOException { + public HTMLPanel(URL url, String identifier) { super(new BorderLayout()); id = identifier; JEditorPane pane = new JEditorPane(); - try{ + try { pane = new JEditorPane(url); - } catch(Exception ex){ + } catch (IOException ex) { //no need to have invalid url fatal ex.printStackTrace(); } diff --git a/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java b/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java index c881543..70a43f2 100644 --- a/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java +++ b/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java @@ -24,13 +24,12 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.io.IOException; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JLabel; -import net.sourceforge.jnlp.about.AboutDialog; +import net.sourceforge.jnlp.about.AboutDialog; import net.sourceforge.jnlp.runtime.Translator; /** @@ -52,11 +51,7 @@ public class AboutPanel extends NamedBorderPanel { aboutButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - try { - AboutDialog.display(); - } catch (IOException ex) { - throw new RuntimeException(ex); - } + AboutDialog.display(); } }); c.fill = GridBagConstraints.BOTH; diff --git a/netx/net/sourceforge/jnlp/runtime/Boot.java b/netx/net/sourceforge/jnlp/runtime/Boot.java index 156b024..fcd87b8 100644 --- a/netx/net/sourceforge/jnlp/runtime/Boot.java +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java @@ -19,7 +19,6 @@ package net.sourceforge.jnlp.runtime; import static net.sourceforge.jnlp.runtime.Translator.R; import java.io.File; -import java.io.IOException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; @@ -158,13 +157,8 @@ public final class Boot implements PrivilegedAction<Void> { System.exit(0); } else { System.out.println(R("BLaunchAbout")); - try { - AboutDialog.display(); - return; - } catch (IOException e) { - System.out.println(R("BLaunchAboutFailure")); - throw new RuntimeException(e); - } + AboutDialog.display(); + return; } } diff --git a/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java index 8888217..8dba0db 100644 --- a/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java +++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java @@ -41,9 +41,8 @@ import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.Observable; -import net.sourceforge.jnlp.about.AboutDialog; +import net.sourceforge.jnlp.about.AboutDialog; import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter; import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen; @@ -69,11 +68,7 @@ public final class DefaultSplashScreens2012Commons { @Override public void mouseClicked(MouseEvent e) { if (e.getY() < painter.getAboutOfset().y && e.getX() > (painter.getAboutOfset().x)) { - try { - AboutDialog.display(); - } catch (Exception ex) { - ex.printStackTrace(); - } + AboutDialog.display(); } } }); |