Skip to content

scijava/swing-checkbox-tree

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

Swing Checkbox Tree

A check box tree package based on John Zukowski's CheckBox Node Tree Sample code.

You can mix and match DefaultMutableTreeNode and CheckBoxNodeData node types. It also allows check box nodes as non-leaf nodes.

It uses a JCheckBox + JLabel in a JPanel to differentiate between clicking on a check box (to check/uncheck a node) versus a label (to select a node).

The latter example also has code for recursively toggling subtrees in response to boxes being checked or unchecked (see the treeNodesChanged method).

See also this question on StackOverflow.

About

Use check boxes in a Swing JTree.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages