summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java44
1 files changed, 24 insertions, 20 deletions
diff --git a/Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java b/Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java
index 38991942..ec50440f 100644
--- a/Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java
+++ b/Dozentenmodul/src/gui/image/CreateImageFreigabe_GUI.java
@@ -14,6 +14,8 @@ import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
import javax.swing.ButtonGroup;
import javax.swing.DefaultComboBoxModel;
@@ -35,6 +37,7 @@ import javax.swing.border.TitledBorder;
import models.Image;
import models.Links;
import util.GuiOrganizer;
+import util.OpenLinks;
@SuppressWarnings("serial")
public class CreateImageFreigabe_GUI extends JFrame {
@@ -209,44 +212,45 @@ public class CreateImageFreigabe_GUI extends JFrame {
mntmFaq.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent arg0) {
-
- String faq;
-
- faq = Links.getFAQ();
-
+
+ OpenLinks open = new OpenLinks();
+
+ URI windows;
try {
- Runtime.getRuntime().exec(
- "rundll32 url.dll,FileProtocolHandler " + faq);
- } catch (IOException e) {
+ windows = new URI(Links.getFAQ());
+
+ open.openWebpage(windows);
+
+ } catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
-
mnNewMenu_1.add(mntmFaq);
+
JMenuItem mntmOtrs = new JMenuItem("OTRS");
mntmOtrs.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent arg0) {
- String otrs;
-
- otrs = Links.getOTRS();
+ OpenLinks open = new OpenLinks();
+
+ URI windows;
try {
- Runtime.getRuntime().exec(
- "rundll32 url.dll,FileProtocolHandler " + otrs);
- } catch (IOException f) {
+ windows = new URI(Links.getOTRS());
+
+ open.openWebpage(windows);
+
+ } catch (URISyntaxException e) {
// TODO Auto-generated catch block
- f.printStackTrace();
+ e.printStackTrace();
}
-
+
}
});
-
- mnNewMenu_1.add(mntmOtrs);
-
+ mnNewMenu_1.add(mntmOtrs);
JMenuItem menuItem = new JMenuItem("About");
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {