diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/AboutDialog.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/AboutDialog.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/AboutDialog.java b/src/main/java/cuchaz/enigma/gui/AboutDialog.java index a874399..bb12466 100644 --- a/src/main/java/cuchaz/enigma/gui/AboutDialog.java +++ b/src/main/java/cuchaz/enigma/gui/AboutDialog.java | |||
| @@ -25,14 +25,14 @@ public class AboutDialog { | |||
| 25 | 25 | ||
| 26 | public static void show(JFrame parent) { | 26 | public static void show(JFrame parent) { |
| 27 | // init frame | 27 | // init frame |
| 28 | final JFrame frame = new JFrame(Constants.Name + " - About"); | 28 | final JFrame frame = new JFrame(Constants.NAME + " - About"); |
| 29 | final Container pane = frame.getContentPane(); | 29 | final Container pane = frame.getContentPane(); |
| 30 | pane.setLayout(new FlowLayout()); | 30 | pane.setLayout(new FlowLayout()); |
| 31 | 31 | ||
| 32 | // load the content | 32 | // load the content |
| 33 | try { | 33 | try { |
| 34 | String html = Util.readResourceToString("/about.html"); | 34 | String html = Util.readResourceToString("/about.html"); |
| 35 | html = String.format(html, Constants.Name, Constants.Version); | 35 | html = String.format(html, Constants.NAME, Constants.VERSION); |
| 36 | JLabel label = new JLabel(html); | 36 | JLabel label = new JLabel(html); |
| 37 | label.setHorizontalAlignment(JLabel.CENTER); | 37 | label.setHorizontalAlignment(JLabel.CENTER); |
| 38 | pane.add(label); | 38 | pane.add(label); |
| @@ -42,9 +42,9 @@ public class AboutDialog { | |||
| 42 | 42 | ||
| 43 | // show the link | 43 | // show the link |
| 44 | String html = "<html><a href=\"%s\">%s</a></html>"; | 44 | String html = "<html><a href=\"%s\">%s</a></html>"; |
| 45 | html = String.format(html, Constants.Url, Constants.Url); | 45 | html = String.format(html, Constants.URL, Constants.URL); |
| 46 | JButton link = new JButton(html); | 46 | JButton link = new JButton(html); |
| 47 | link.addActionListener(event -> Util.openUrl(Constants.Url)); | 47 | link.addActionListener(event -> Util.openUrl(Constants.URL)); |
| 48 | link.setBorderPainted(false); | 48 | link.setBorderPainted(false); |
| 49 | link.setOpaque(false); | 49 | link.setOpaque(false); |
| 50 | link.setBackground(Color.WHITE); | 50 | link.setBackground(Color.WHITE); |