summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/gui/intro/VmWareLink_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/intro/VmWareLink_GUI.java57
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