summaryrefslogtreecommitdiffstats
path: root/Master/Agile Software Development/TestApp/src/testapp/App.java
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Agile Software Development/TestApp/src/testapp/App.java
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Agile Software Development/TestApp/src/testapp/App.java')
-rw-r--r--Master/Agile Software Development/TestApp/src/testapp/App.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/Agile Software Development/TestApp/src/testapp/App.java b/Master/Agile Software Development/TestApp/src/testapp/App.java
new file mode 100644
index 0000000..d0e1a55
--- /dev/null
+++ b/Master/Agile Software Development/TestApp/src/testapp/App.java
@@ -0,0 +1,60 @@
+/*
+ * Main
+ */
+
+package testapp;
+
+import java.io.IOException;
+import javax.swing.JFrame;
+import javax.swing.UIManager;
+import java.util.logging.*;
+
+/**
+ *
+ * @author eisenhauer
+ */
+public class App {
+
+ private static App theInstance = null;
+ private JFrame mainFrame = null;
+ private String appPath = "";
+ private App() {
+ try {
+ this.appPath = Locate.getClassLocation(this.getClass()).getParent();
+ // to run from Netbeans
+ if (appPath.contains("build")) {
+ appPath = appPath.replace("build", "dist");
+ }
+ } catch (IOException ioe) {
+ ioe.printStackTrace();
+ }
+ }
+
+ public static App getInstance() {
+ if (theInstance == null) {
+ theInstance = new App();
+ }
+ return theInstance;
+ }
+ private void startApplication() {
+ // Setup Look and Feel
+ try {
+ //UIManager.setLookAndFeel(new com.jgoodies.looks.windows.WindowsLookAndFeel());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ mainFrame = new AppFrame("Webspinne");
+ mainFrame.pack();
+ mainFrame.setVisible(true);
+ }
+ public String getAppPath() {
+ return appPath;
+ }
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ App.getInstance().startApplication();
+ }
+
+}