if ((e.getActionCommand()).equals("refreshButton")) {
if ((e.getActionCommand()).equals("refreshButtonPanes")) {
   public static Display startConsole(String nameDisplay, int height,         int width, String positionDisplay, final boolean showRootProcess, final boolean showCDasChild, final boolean showScripting,         final String hostname, final int port, boolean shouldSystemExit)          throws Exception {      final JButton refreshButton = new JButton();      JMenu jMenuMng = new JMenu();      final JCheckBoxMenuItem jCheckBoxMenuItemShowRootProcessPanel = new JCheckBoxMenuItem();      final JCheckBoxMenuItem jCheckBoxMenuItemShowCDasChild = new JCheckBoxMenuItem();      final JMenuItem jMenuScriptingPanel = new JMenuItem();      String infoConnection = ("sfManagementConsole connecting to " +            hostname + ":" + port);      //Logger.log(infoConnection);      sfLogStatic().out(infoConnection);      nameDisplay = nameDisplay + " [" + "sfManagementConsole connected to " +            hostname + ":" + port + "]";      if (showRootProcess) {         sfLogStatic().warn(" showing rootProcess");         //Logger.log(" showing rootProcess");      } else {         //System.out.println("");      }      final Display newDisplay;      if (org.smartfrog.services.display.WindowUtilities.areGraphicsAvailable()) {         newDisplay = new Display(nameDisplay, null);         addFrogIcon(newDisplay);         newDisplay.setShouldSystemExit(shouldSystemExit);         newDisplay.setVisible(false);         newDisplay.setSize(width, height);         newDisplay.setAskSaveChanges(false);         org.smartfrog.services.display.WindowUtilities.setPositionDisplay(null, newDisplay, positionDisplay);         // Button for Refresh view ...         refreshButton.setText("Refresh");         refreshButton.setActionCommand("refreshButton");         refreshButton.addActionListener(            new ActionListener() {               public void actionPerformed(ActionEvent e) {                  //System.out.println("ActionEvent SFDEployDisplay: "+ e);                  if ((e.getActionCommand()).equals("refreshButton")) {                     //preserve scripting panel                     JTabbedPane scriptingTab = initScriptingTabbedPane (newDisplay.tabPane,false);                     try {                      newDisplay.cleanAddedPanels();                     } catch (Throwable thr1) {                        if (LogFactory.getLog("SFManagementConsole").isErrorEnabled()){                          LogFactory.getLog("SFManagementConsole").error(thr1);                        }                     }                     try {                        addProcessesPanels(newDisplay, jCheckBoxMenuItemShowRootProcessPanel.isSelected(), //showRootProcess,                              jCheckBoxMenuItemShowCDasChild.isSelected(),hostname, port);                         //Add scripting panel                         if (scriptingTab!=null) newDisplay.tabPane.add(scriptingPanelName,scriptingTab);                     } catch (Throwable ex) {                        if (LogFactory.getLog("SFManagementConsole").isErrorEnabled()){                          LogFactory.getLog("SFManagementConsole").error(ex);                        }                        //exitWith("Error in SFDeployDisplay.refresh():" + ex, ExitCodes.EXIT_ERROR_CODE_GENERAL);                     }                  }               }            });         newDisplay.mainToolBar.add(refreshButton);         newDisplay.showToolbar(true);         // Add deployTreePanel menu items         jMenuMng.setText("Mng. Console");         newDisplay.jMenuBarDisplay.add(jMenuMng);         jCheckBoxMenuItemShowRootProcessPanel.setSelected(showRootProcess);         jCheckBoxMenuItemShowRootProcessPanel.setText("Show rootProcess");         jCheckBoxMenuItemShowRootProcessPanel.setAccelerator(javax.swing.KeyStroke.getKeyStroke(77, java.awt.event.KeyEvent.CTRL_MASK | java.awt.event.KeyEvent.ALT_MASK, false));         jCheckBoxMenuItemShowRootProcessPanel.addActionListener(new ActionListener() {               public void actionPerformed(ActionEvent e) {                            refreshButton.doClick();               }         });         jMenuMng.add(jCheckBoxMenuItemShowRootProcessPanel);         jCheckBoxMenuItemShowCDasChild.setSelected(showCDasChild);         jCheckBoxMenuItemShowCDasChild.setText("Show show CD as child");         jCheckBoxMenuItemShowCDasChild.addActionListener(new ActionListener() {               public void actionPerformed(ActionEvent e) {                            refreshButton.doClick();               }         });         jMenuMng.add(jCheckBoxMenuItemShowCDasChild);         jMenuScriptingPanel.setText("Add Scripting ...");         jMenuScriptingPanel.addActionListener(new ActionListener() {               public void actionPerformed(ActionEvent e) {                   try {                      addScriptingPanel (newDisplay.tabPane, null,null,hostname,port );                   } catch (Exception e1) {                       if (sfLogStatic().isErrorEnabled()){ sfLogStatic().error(e1);}                       WindowUtilities.showError(newDisplay,e1.toString());                   }                  //refreshButton.doClick();               }         });         jMenuMng.add(jMenuScriptingPanel);         newDisplay.setVisible(true);         addProcessesPanels(newDisplay, showRootProcess, showCDasChild, hostname, port);         if (showScripting) addScriptingPanel (newDisplay.tabPane, null,null,hostname,port );                  return newDisplay;      }      return null;   }