public void addRecordSelectedListener() {
tree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
MajorRecordHolderLeaf node = null;
if(tree.getLastSelectedPathComponent() instanceof MajorRecordHolderLeaf) {
node = (MajorRecordHolderLeaf)
tree.getLastSelectedPathComponent();
}
/* if nothing is selected */
if (node == null) return;
obs.autoUpdate(0, new MajorRecordHolder((node.getHeldObject())));
}
});
}