/* * 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(); } }