source: src/main/java/genius/gui/actions/OpenManual.java@ 209

Last change on this file since 209 was 1, checked in by Wouter Pasman, 6 years ago

Initial import : Genius 9.0.0

File size: 662 bytes
Line 
1package genius.gui.actions;
2
3import java.awt.Desktop;
4import java.awt.event.ActionEvent;
5import java.io.File;
6import java.io.IOException;
7
8import javax.swing.AbstractAction;
9import javax.swing.JOptionPane;
10
11@SuppressWarnings("serial")
12public class OpenManual extends AbstractAction {
13
14 public OpenManual() {
15 super("User Guide");
16 }
17
18 @Override
19 public void actionPerformed(ActionEvent e) {
20 if (Desktop.isDesktopSupported()) {
21 try {
22 File myFile = new File("userguide.pdf");
23 Desktop.getDesktop().open(myFile);
24 } catch (IOException ex) {
25 JOptionPane.showMessageDialog(null, "There is no program registered to open PDF files.");
26 }
27 }
28 }
29
30}
Note: See TracBrowser for help on using the repository browser.