@Override
  protected void done() {
    try {
      String result = get();

      if (result != null) {
        JOptionPane.showMessageDialog(
            mainPanel, result, "Error opening file", JOptionPane.ERROR_MESSAGE);
      } else {
        JideTabbedPane tabbedPane = mainPanel.getTabbedPane();
        if (tabbedPane != null) {
          if (contentPanel != null) {
            // Already opened!
            tabbedPane.setSelectedComponent(contentPanel);
          } else {
            FolderDiffPanel panel = new FolderDiffPanel(mainPanel, diff);
            panel.setId(contentId);

            tabbedPane.addTab(panel.getTitle(), ImageUtil.getSmallImageIcon("stock_folder"), panel);
            tabbedPane.setSelectedComponent(panel);
          }
        }
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
 private JideTabbedPane createTabbedPane(Demo demo) {
   _pane = new JideTabbedPane();
   _demoPanel = demo.getDemoPanel();
   _pane.addTab("Demo", new JideScrollPane(new DemoPanel(_demoPanel)));
   _pane.setTabShape(JideTabbedPane.SHAPE_BOX);
   _pane.setHideOneTab(true);
   _pane.setFocusable(false);
   _pane.setTabPlacement(JideTabbedPane.TOP);
   return _pane;
 }
 public void browseSourceCode() {
   if (_pane.getTabCount() == 1) {
     _pane.addTab("Source", AbstractDemo.createSourceCodePanel(_demo.getDemoSource()));
   }
   _pane.setSelectedIndex(1);
 }