my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Need plus sign after collapsing selected node(which doesn't have child node) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need plus sign after collapsing selected node(which doesn Watch "Need plus sign after collapsing selected node(which doesn New topic
Author

Need plus sign after collapsing selected node(which doesn't have child node)

Lakshmi Gurusamy
Greenhorn

Joined: Oct 24, 2012
Posts: 2
Hi,

When I click on + sign on selected node, it will expand and will display child nodes. After expanding it shows - minus sign on selected node. When I click on - sign, it should collapse and should show + sign over there. It is working fine if selected node has child nodes and not working if selected node doesn't have child node.

My requirement is that when we collapse node which doesn't have child node then it should collapse and should show + sign over there.

Can anyone please help me on this.
m Korbel
Ranch Hand

Joined: Jun 19, 2012
Posts: 150
not clear from your question, search for JTreeTable or Accordition
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if it has no children it's a leaf.
you want the leaf to have a + sign.

so what is to happen when you click that + sign?
Lakshmi Gurusamy
Greenhorn

Joined: Oct 24, 2012
Posts: 2
Thanks for your quick response.

Yes, its a leaf node and I want the leaf to have a + sign.

If I click it opens splitted screen, so I need plus sign there.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need plus sign after collapsing selected node(which doesn't have child node)
 
Similar Threads
Dynamic tree in JSP or Javascript
JTree/JScrollpane problem
Is there another way..............................
How to checked CheckBox in JTree only when user click on CheckBox?
Showing PLUS sign(tree expansion) even if child is not present