diff options
author | Jiri Vanek <[email protected]> | 2013-07-17 18:13:27 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-07-17 18:13:27 +0200 |
commit | 26dd00c0e206323d17c4b84adeda1cb43084a7a2 (patch) | |
tree | 796a1ec148e83020572467c2880cf3f33f4c8b18 /netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java | |
parent | 13a4575e5b62e722d152dd430a3582bf0b5db690 (diff) |
about dialogue now available from itw-settings
Diffstat (limited to 'netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java b/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java index 126923d..c881543 100644 --- a/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java +++ b/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java @@ -22,9 +22,14 @@ import java.awt.Component; import java.awt.Dimension; 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.runtime.Translator; @@ -43,7 +48,17 @@ public class AboutPanel extends NamedBorderPanel { JLabel logo = new JLabel(); JLabel aboutLabel = new JLabel("<html>" + Translator.R("CPAboutInfo") + "</html>"); - + JButton aboutButton = new JButton(Translator.R("AboutDialogueTabAbout")); + aboutButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + try { + AboutDialog.display(); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + } + }); c.fill = GridBagConstraints.BOTH; c.gridy = 0; c.gridx = 0; @@ -53,11 +68,20 @@ public class AboutPanel extends NamedBorderPanel { c.gridx = 1; c.weightx = 1; add(aboutLabel, c); - + c.fill = GridBagConstraints.NONE; + c.weighty = 0; + c.weightx = 0; + c.gridy++; + c.gridx=1; + add(aboutButton, c); /* Keep all the elements at the top of the panel (Extra padding) */ + c.fill = GridBagConstraints.BOTH; Component filler = Box.createRigidArea(new Dimension(1, 1)); c.weighty = 1; c.gridy++; add(filler, c); + + + } } |