final JButton refresh;
final JButton refreshButton;
   public static Display startConsole(String nameDisplay, int height,         int width, String positionDisplay, final boolean showRootProcess,         final String hostname, final int port, boolean shouldSystemExit)          throws Exception {      final JButton refresh;      JMenu jMenuMng = new JMenu();      final JCheckBoxMenuItem jCheckBoxMenuItemShowRootProcessPanel = new JCheckBoxMenuItem();      String infoConnection = ("sfManagementConsole connecting to " +            hostname + ":" + port);      System.out.print(infoConnection);      nameDisplay = nameDisplay + " [" + "sfManagementConsole connected to " +            hostname + ":" + port + "]";      if (showRootProcess) {         Logger.log(" showing rootProcess");      } else {         //System.out.println("");      }      final Display display;      if (org.smartfrog.services.display.WindowUtilities.areGraphicsAvailable()) {         display = new Display(nameDisplay, null);         display.setShouldSystemExit(shouldSystemExit);         display.setVisible(false);         display.setSize(width, height);         org.smartfrog.services.display.WindowUtilities.setPositionDisplay(null,               display, positionDisplay);         // Button for Refresh view ...         refresh = new JButton();         refresh.setText("Reload panels");         refresh.setActionCommand("refreshButton");         refresh.addActionListener(            new ActionListener() {               public void actionPerformed(ActionEvent e) {                  //System.out.println("ActionEvent SFDEployDisplay: "+ e);                  if ((e.getActionCommand()).equals("refreshButton")) {                     display.cleanAddedPanels();                     try {                        addProcessesPanels(display, jCheckBoxMenuItemShowRootProcessPanel.isSelected(), //showRootProcess,                              hostname, port);                     } catch (Exception ex) {                        Logger.log(ex);//                        System.err.println();//                        ex.printStackTrace();                        exitWith("Error in SFDeployDisplay.refresh():" +                              ex);                     }                  }               }            });         display.mainToolBar.add(refresh);         display.showToolbar(true);         // Add deployTreePanel menu items         jMenuMng.setText("Mng. Console");         display.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) {                            refresh.doClick();               }         });         jMenuMng.add(jCheckBoxMenuItemShowRootProcessPanel);         display.setVisible(true);         addProcessesPanels(display, showRootProcess, hostname, port);         return display;      }      return null;   }