/** * Sets the selected node based on the specified OID. The MIB that will be searched is based on * the currently selected MIB node. * * @param oid the OID to select */ public void setSelectedNode(String oid) { // Find tree node MibValueSymbol symbol = browser.findMibSymbol(oid); MibNode node = MibTreeBuilder.getInstance().getNode(symbol); if (node == null) { mibTree.clearSelection(); return; } // Select tree node TreePath path = new TreePath(node.getPath()); mibTree.expandPath(path); mibTree.scrollPathToVisible(path); mibTree.setSelectionPath(path); mibTree.repaint(); }