public MainFrame(String title, UserFrontEnd ptheApp) { super(title); theApp = ptheApp; // identify the OS if (theApp.runningOSX()) initForOSX(); // OSX specific inits else if (theApp.runningWindows()) { // Windows specific inits initForWindows(); } else if (theApp.runningLinux()) { initForLinux(); } else { JOptionPane.showMessageDialog( this, "Phylontal doesn't recognize your operating system (yet!)", "Operating System unknown", JOptionPane.WARNING_MESSAGE); } setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); // add tabbed pane tabbedView = new JTabbedPane(JTabbedPane.TOP); tabbedView.addChangeListener(this); tabbedView.addTab("Project", projectTab = new ProjectTab(theApp)); tabbedView.addTab("Matcher", matcherTab = new MatcherTab(theApp)); int matchIndex = tabbedView.indexOfComponent(matcherTab); tabbedView.setToolTipTextAt(matchIndex, "Disabled until a project is specified"); tabbedView.setEnabledAt(matchIndex, false); int projectIndex = tabbedView.indexOfComponent(projectTab); tabbedView.setToolTipTextAt(projectIndex, "Create or Load a project; specify components"); currentTabComponent = tabbedView.getSelectedComponent(); if (currentTabComponent instanceof TabView) { resetMenuBar(); JMenuBar tmpBar = ((TabView) currentTabComponent).initializeMenus(); if (tmpBar != null) { menuBar = tmpBar; setJMenuBar(menuBar); } } Container content = getContentPane(); // get content pane content.setLayout(new BorderLayout()); content.add(tabbedView, BorderLayout.CENTER); // add icons // add preferences Dialog preferencesDialog = new PreferencesDialog(this); }