How to implement a tiered "selection tree" in Swing? (Or: is there an existing implementation?)

Posted by Sbodd on Stack Overflow See other posts from Stack Overflow or by Sbodd
Published on 2010-06-10T16:28:26Z Indexed on 2010/06/10 18:23 UTC
Read the original article Hit count: 100

Filed under:
|
|

I need a Swing component that will let me display a tree-structured list of items, and allow the user to select or de-select an arbitrary subset of those items, with the ability to select or deselect an entire subtree's worth of components by picking that subtree's parent. (Basically, something similar to the Eclipse "Export JAR file's" dialog (an image of the relevant dialog is here - I basically want the "Select resources to export" component, but for a Swing application.)

I know I can do this by creating a custom TreeCellRenderer, a custom TreeCellEditor, and a custom TreeModel - but that seems like an awful lot of work. Are there any good off-the-shelf implementations that I can use?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about swing