diff options
author | Jonathan Bauer | 2014-09-18 13:44:08 +0200 |
---|---|---|
committer | Jonathan Bauer | 2014-09-18 13:44:08 +0200 |
commit | b819dffd8a2e46c900f50c9f873c0603a83e8c79 (patch) | |
tree | 59cfcc46dcd54935a637fa77ebf0d5a7f5acab81 /dozentenmodul/src/main/java/App.java | |
parent | Revert "[client] center GUIs in the primary display only" (diff) | |
download | tutor-module-b819dffd8a2e46c900f50c9f873c0603a83e8c79.tar.gz tutor-module-b819dffd8a2e46c900f50c9f873c0603a83e8c79.tar.xz tutor-module-b819dffd8a2e46c900f50c9f873c0603a83e8c79.zip |
[client] moved main function to App.java & refined Config stuff
Diffstat (limited to 'dozentenmodul/src/main/java/App.java')
-rw-r--r-- | dozentenmodul/src/main/java/App.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/App.java b/dozentenmodul/src/main/java/App.java new file mode 100644 index 00000000..10b9a460 --- /dev/null +++ b/dozentenmodul/src/main/java/App.java @@ -0,0 +1,40 @@ +import gui.intro.Login_GUI; + +import java.awt.EventQueue; +import java.io.IOException; + +import javax.swing.JOptionPane; + +import config.Config; + + +public class App { + + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + // Pruefe und Erzeuge gegebenfalls Config + try { + Config.init(); + } catch (IOException e) { + e.printStackTrace(); + JOptionPane.showMessageDialog(null, e.getMessage(), + "Fehler", JOptionPane.ERROR_MESSAGE); + return; + } + + // Aufruf und Anzeige des Login Fensters + Login_GUI frame = new Login_GUI(); + frame.setVisible(true); + + } catch (Exception e) { + e.printStackTrace(); + JOptionPane.showMessageDialog(null, e.getStackTrace(), + "Message", JOptionPane.ERROR_MESSAGE); + } + } + + }); + } +} |