0

I would like to know how can I implement a navigator tree for my application in swing. I got a long sequence of panel, and I would like to have on left side of the screen a kind of "navigator". It seems easy as concept, but I really do not know where to start. To get you a picture is something like this:

enter image description here

I would like to realize the "red zone" :)

Actually I'm able to construct the tree iterating through the arraylist provided by the controller, in this way:

Iterator<SectionPanel> sectionIterator = sectionPanelList.iterator();
    while (sectionIterator.hasNext()) {
         root.add(new DefaultMutableTreeNode(sectionIterator.next()));
    }

The question is: if I want to remove a particular object, how can I find it within the tree? Moreover, how can I connect an action with the relative JPanel ? I mean "when I click on Panelx, I would like the scroll to move and let me see that particular panel ".

Thanks for your attention. Simone

4

1 回答 1

2

为了展示一个单曲JPanel,你可以

于 2012-10-20T19:34:29.417 回答