This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTree expansion

 
NIKHIL EROS
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My tree is coming collapsed when i run my application, i have tried using functions like expandRow(int), setExpandedState(Treepath, boolean), but it doesn't work.
Also if i use setExpandedState(Treepath, boolean) function, then in collapsed state Treepath argument will be null, so there is no point in using it.
please help me!!
thanks in advance.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Nikhil,
Not sure what you have tried. The example below works great. To run it just type:
java ExpandDemo
To run it and have all folders expanded type:
java ExpandDemo true

Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic