protected void savePreferences() {
    instrumentsTable.saveColumnsVisibleState();
    instrumentsTable.saveColumnWidths();

    int i = splitPane.getDividerLocation();
    preferences().setIntProperty("InstrumentsDbPane.splitDividerLocation", i);
  }
    MainPane() {
      setLayout(new BorderLayout());
      JScrollPane sp = new JScrollPane(instrumentsTable);
      add(sp);
      instrumentsTable.reloadAction.putValue(Action.SMALL_ICON, Res.iconReload22);

      instrumentsTable.createDirectoryAction.putValue(Action.SMALL_ICON, Res.iconNew16);

      instrumentsTable.getParent().setBackground(instrumentsTable.getBackground());

      searchResultsNode.setDetached(true);
    }
  /** Creates a new instance of <code>InstrumentsDbPane</code> */
  public InstrumentsDbPane() {
    setLayout(new BorderLayout());
    if (SHF.getInstrumentsDbTreeModel() != null) {
      instrumentsDbTree = new FantasiaInstrumentsDbTree(SHF.getInstrumentsDbTreeModel());
    } else {
      instrumentsDbTree = new FantasiaInstrumentsDbTree(new InstrumentsDbTreeModel(true));
    }

    instrumentsTable = new JSInstrumentsDbTable(instrumentsDbTree, "InstrumentsDbPane.");
    instrumentsTable.getModel().setShowDummyColumn(true);
    instrumentsTable.loadColumnsVisibleState();
    instrumentsTable.loadColumnWidths();
    instrumentsTable.loadSortOrder();

    instrumentsDbTree.setSelectedDirectory("/");

    JScrollPane sp1 = new JScrollPane(instrumentsDbTree);
    sp1.setPreferredSize(new Dimension(200, 200));
    JScrollPane sp2 = new JScrollPane(instrumentsTable);
    sp2.setPreferredSize(new Dimension(200, 200));
    sp2.setOpaque(false);
    sp2.getViewport().setOpaque(false);

    splitPane =
        new JSplitPane(
            JSplitPane.VERTICAL_SPLIT,
            true, // continuousLayout
            sp1,
            sp2);

    splitPane.setResizeWeight(0.4);

    add(splitPane);
    add(new ToolBar(), BorderLayout.NORTH);

    int i = preferences().getIntProperty("InstrumentsDbPane.splitDividerLocation", 160);
    splitPane.setDividerLocation(i);
  }
 public void showSearchResultsNode() {
   instrumentsDbTree.clearSelection();
   instrumentsTable.setParentDirectoryNode(searchResultsNode);
 }