示例#1
0
  /** @param props */
  public void initFrame(AppProperties props) {

    m_OS = new OSValidator();
    m_props = props;

    m_rootapp = new JRootApp();

    if (m_rootapp.initApp(m_props)) {

      if ("true".equals(props.getProperty("machine.uniqueinstance"))) {
        // Register the running application
        try {
          m_instmanager = new InstanceManager(this);
        } catch (RemoteException | AlreadyBoundException e) {
        }
      }

      // Show the application
      add(m_rootapp, BorderLayout.CENTER);

      setTitle(AppLocal.APP_NAME + " - V" + AppLocal.APP_VERSION);

      Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
      setBounds(0, 0, d.width, d.height);

      setVisible(true);
    } else {
      new JFrmConfig(props).setVisible(true); // Show the configuration window.
    }
  }
示例#2
0
  private void formWindowClosing(
      java.awt.event.WindowEvent evt) { // GEN-FIRST:event_formWindowClosing

    m_rootapp.tryToClose();
  } // GEN-LAST:event_formWindowClosing