- setVisible( false );
- setMainPanel( new MainPanelApplets( getConfiguration(), this ) );
- _jmenubar = new JMenuBar();
- if ( !getConfiguration().isHideControlPanelAndMenubar() ) {
- if ( !getConfiguration().isUseNativeUI() ) {
- _jmenubar.setBackground( getConfiguration().getGuiMenuBackgroundColor() );
- }
- if ( getSpeciesTree() != null ) {
- buildAnalysisMenu();
- }
- buildToolsMenu();
- buildViewMenu();
- buildFontSizeMenu();
- buildOptionsMenu();
- buildTypeMenu();
- buildHelpMenu();
- setJMenuBar( _jmenubar );
- }
- final Container contentpane = getContentPane();
- contentpane.setLayout( new BorderLayout() );
- contentpane.add( getMainPanel(), BorderLayout.CENTER );
- addComponentListener( new ComponentAdapter() {
-
- @Override
- public void componentResized( final ComponentEvent e ) {
- if ( getMainPanel().getCurrentTreePanel() != null ) {
- getMainPanel().getCurrentTreePanel().calcParametersForPainting( getMainPanel()
- .getCurrentTreePanel()
- .getWidth(),
- getMainPanel()
- .getCurrentTreePanel()
- .getHeight(),
- getOptions()
- .isAllowFontSizeChange() );
+ try {
+ setVisible( false );
+ setMainPanel( new MainPanelApplets( getConfiguration(), this ) );
+ _jmenubar = new JMenuBar();
+ if ( !getConfiguration().isHideControlPanelAndMenubar() ) {
+ if ( !getConfiguration().isUseNativeUI() ) {
+ _jmenubar.setBackground( getConfiguration().getGuiMenuBackgroundColor() );