Zaad -9 Junior Poster in Training

Hi techies got a small problem a swin related one... I found a similar article here Click Here But seems no answer for that in that particular thread in this forum. Since that is a very old thread thought it would be right to put in my question as a fresh one.

The problem is I have a JTree and on a saving of a detail in system got to reload the tree I setthe selectedp path all goes write but the node does ot gets hioghlighted when done programatically......

Following is my codes

TreePath path = ((m_treeContacts.getSelectionPath()));
    doUnitValueChanged(getM_selCmbBoxUnit().getSelectedId());

    m_treeContacts.getSelectionModel().setSelectionPath(path);

    m_treeContacts.fireTreeExpanded(path);

    m_treeContacts.setSelectionPath(new TreePath(m_treeContacts.getSelectedNode().getUserObjectPath()));
     m_treeContacts.scrollPathToVisible(path);

Any help would be appreciated

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.