public void initFrame(AppProperties props) { 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 (Exception e) { } } // Show the application add(m_rootapp, BorderLayout.CENTER); try { this.setIconImage( ImageIO.read( JRootFrame.class.getResourceAsStream("/com/openbravo/images/favicon.png"))); } catch (IOException e) { } setTitle(AppLocal.APP_NAME + " - " + AppLocal.APP_VERSION); pack(); setLocationRelativeTo(null); setVisible(true); } else { new JFrmConfig(props).setVisible(true); // Show the configuration window. } }
@Override public Boolean initFrame(AppProperties props) { 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 (Exception e) { } } // Show the application add(m_rootapp, BorderLayout.CENTER); try { this.setIconImage( ImageIO.read( JRootFrame.class.getResourceAsStream("/com/openbravo/images/favicon.png"))); } catch (IOException e) { } setTitle(AppLocal.APP_NAME + " - " + AppLocal.APP_VERSION); // pack(); this.setSize(800, 600); // set size for normal window state this.setExtendedState(MAXIMIZED_BOTH); setLocationRelativeTo(null); super.initFrame(props); setVisible(true); return true; } else { return false; } }