Last change
on this file since 345 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
662 bytes
|
Line | |
---|
1 | package genius.gui.actions;
|
---|
2 |
|
---|
3 | import java.awt.Desktop;
|
---|
4 | import java.awt.event.ActionEvent;
|
---|
5 | import java.io.File;
|
---|
6 | import java.io.IOException;
|
---|
7 |
|
---|
8 | import javax.swing.AbstractAction;
|
---|
9 | import javax.swing.JOptionPane;
|
---|
10 |
|
---|
11 | @SuppressWarnings("serial")
|
---|
12 | public 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.