• Post Reply Bookmark Topic Watch Topic
  • New Topic

Customizing JTree leaf nodes  RSS feed

 
Cathy Song
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Could anyone provided me with examples or links/info on where I can find information on customizing JTree leaf nodes, such that some leaf nodes could have a combo box or a text field *next* to them.

Eg:
root
|
|--leaf (text field)
|
|--leaf (combo box)

Thanks,
Cathy.
[ May 19, 2004: Message edited by: Cathy Song ]
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an article about that here:

http://www.phptr.com/articles/article.asp?p=26327&seqNum=21
 
Cathy Song
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Tim. That approach allows me to make a leaf a combo box etc.

How can I add a label and a combo box next to it? Will I need to subclass the DefaultTreeCellEditor class?

|
|
|--label (combo box/text field)

Thanks,
Cathy.
[ May 19, 2004: Message edited by: Cathy Song ]
 
Cathy Song
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I just use a TreeTable kind of component to solve this problem?

-Cathy.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!