diff options
author | Michael Wilson | 2014-05-21 15:11:28 +0200 |
---|---|---|
committer | Michael Wilson | 2014-05-21 15:11:28 +0200 |
commit | fbc0e3d00ef1726a26631ab2baa33102c57d77e4 (patch) | |
tree | 473cf92af1153603273bdb3b81ea9442226d13d6 /Dozentenmodul | |
parent | ddd (diff) | |
download | tutor-module-fbc0e3d00ef1726a26631ab2baa33102c57d77e4.tar.gz tutor-module-fbc0e3d00ef1726a26631ab2baa33102c57d77e4.tar.xz tutor-module-fbc0e3d00ef1726a26631ab2baa33102c57d77e4.zip |
Verlinkung zum VMWare Player Download geht jetzt
Diffstat (limited to 'Dozentenmodul')
-rw-r--r-- | Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class | bin | 695 -> 695 bytes | |||
-rw-r--r-- | Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class | bin | 1629 -> 0 bytes | |||
-rw-r--r-- | Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class | bin | 2192 -> 0 bytes | |||
-rw-r--r-- | Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class | bin | 827 -> 0 bytes | |||
-rw-r--r-- | Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class | bin | 5449 -> 6233 bytes | |||
-rw-r--r-- | Dozentenmodul/src/gui/intro/VmWareLink_GUI.java | 76 |
6 files changed, 54 insertions, 22 deletions
diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class Binary files differindex be8f1a48..e1f554c7 100644 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$1.class diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class Binary files differdeleted file mode 100644 index 0527987f..00000000 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$2.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class Binary files differdeleted file mode 100644 index a1ae48ca..00000000 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$3.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class Binary files differdeleted file mode 100644 index 1a30bb2e..00000000 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI$4.class +++ /dev/null diff --git a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class Binary files differindex 0b931e12..ac3b9414 100644 --- a/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class +++ b/Dozentenmodul/bin/gui/intro/VmWareLink_GUI.class diff --git a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java index c94586d8..41515eff 100644 --- a/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java +++ b/Dozentenmodul/src/gui/intro/VmWareLink_GUI.java @@ -7,7 +7,6 @@ import java.awt.FlowLayout; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.JButton; -import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.UIManager; @@ -29,14 +28,13 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.net.URL; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JCheckBox; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; - import models.Links; - import org.ini4j.InvalidFileFormatException; import org.ini4j.Wini; @@ -46,19 +44,11 @@ public class VmWareLink_GUI extends JFrame { private final JPanel contentPanel = new JPanel(); String[] result; + String uriWindows="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; + String uriLinux="https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_player/6_0"; JCheckBox chckbxNewCheckBox; - /** - * Launch the application. - */ - public static void main(String[] args) { - try { - VmWareLink_GUI dialog = new VmWareLink_GUI(); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.setVisible(true); - } catch (Exception e) { - e.printStackTrace(); - } - } + private JButton btnWindows; + /** * Create the dialog. @@ -169,13 +159,36 @@ public class VmWareLink_GUI extends JFrame { lbllinuxvmwarePlayer.setBounds(10, 178, 499, 14); contentPanel.add(lbllinuxvmwarePlayer); - JLabel lblvmwarePlayerDownload = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload.setBounds(10, 118, 499, 14); - contentPanel.add(lblvmwarePlayerDownload); + btnWindows = new JButton("VMware Player herunterladen"); + btnWindows.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + try { + URI windows= new URI(uriWindows); + openWebpage(windows); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + }); + btnWindows.setBounds(10, 119, 186, 23); + contentPanel.add(btnWindows); - JLabel lblvmwarePlayerDownload_1 = new JLabel("<html><a href=\"https:////my.vmware.com//web//vmware//free#desktop_end_user_computing//vmware_player//6_0\" >vmWare Player Download</a></html>"); - lblvmwarePlayerDownload_1.setBounds(10, 203, 499, 14); - contentPanel.add(lblvmwarePlayerDownload_1); + JButton btnLinux = new JButton("VMware Player herunterladen"); + btnLinux.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + URI windows= new URI(uriLinux); + openWebpage(windows); + } catch (URISyntaxException f) { + // TODO Auto-generated catch block + f.printStackTrace(); + } + } + }); + btnLinux.setBounds(10, 203, 186, 23); + contentPanel.add(btnLinux); { JPanel buttonPane = new JPanel(); buttonPane.setBounds(0, 630, 587, 33); @@ -258,5 +271,24 @@ 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 + + public static void openWebpage(URL url) { + try { + openWebpage(url.toURI()); + } catch (URISyntaxException e) { + e.printStackTrace(); + } } -} +}// end class |