diff options
| author | Murilo Araujo | 2014-06-17 11:20:55 +0200 |
|---|---|---|
| committer | Murilo Araujo | 2014-06-17 11:20:55 +0200 |
| commit | e7d0d94df89b3f84bace0ad7b56f84622d2c2975 (patch) | |
| tree | 4977e4092116d9bffa61841a696449c26d313d25 /Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | |
| parent | Bug Fix (diff) | |
| download | tutor-module-e7d0d94df89b3f84bace0ad7b56f84622d2c2975.tar.gz tutor-module-e7d0d94df89b3f84bace0ad7b56f84622d2c2975.tar.xz tutor-module-e7d0d94df89b3f84bace0ad7b56f84622d2c2975.zip | |
links fqa und otrs
Diffstat (limited to 'Dozentenmodul/src/gui/intro/VmWareLink_GUI.java')
| -rw-r--r-- | Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | 57 |
1 files changed, 40 insertions, 17 deletions
diff --git a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java index cfe046ad..87c6b2a2 100644 --- a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -39,6 +39,7 @@ import org.ini4j.InvalidFileFormatException; import org.ini4j.Wini; import util.GuiOrganizer; +import util.OpenLinks; @SuppressWarnings("serial") @@ -161,8 +162,13 @@ public class VmWareLink_GUI extends JFrame { btnWindows.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { - URI windows= new URI(Links.getUriWindows()); - openWebpage(windows); + + OpenLinks open = new OpenLinks(); + + URI windows= new URI(Links.getUriWindows()); + + open.openWebpage(windows); + } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -172,13 +178,17 @@ public class VmWareLink_GUI extends JFrame { }); btnWindows.setBounds(10, 119, 186, 23); contentPanel.add(btnWindows); - + JButton btnLinux = new JButton("VMware Player herunterladen"); btnLinux.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { - URI windows= new URI(Links.getUriLinux()); - openWebpage(windows); + OpenLinks open = new OpenLinks(); + + URI linux= new URI(Links.getUriLinux()); + + open.openWebpage(linux); + } catch (URISyntaxException f) { // TODO Auto-generated catch block f.printStackTrace(); @@ -228,8 +238,19 @@ public class VmWareLink_GUI extends JFrame { @Override public void mousePressed(MouseEvent arg0) { - Links.openFAQ(); + OpenLinks open = new OpenLinks(); + URI windows; + try { + windows = new URI(Links.getFAQ()); + + open.openWebpage(windows); + + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } }); @@ -241,7 +262,18 @@ public class VmWareLink_GUI extends JFrame { @Override public void mousePressed(MouseEvent arg0) { - Links.openOTRS(); + OpenLinks open = new OpenLinks(); + + URI windows; + try { + windows = new URI(Links.getOTRS()); + + open.openWebpage(windows); + + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } }); @@ -255,15 +287,6 @@ public class VmWareLink_GUI extends JFrame { }//end constructor - public static void openWebpage(URI uri) { - Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; - if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { - try { - desktop.browse(uri); - } catch (Exception e) { - e.printStackTrace(); - } - } - }// end openWebpage + }// end class |
