# swing-checkbox-tree **Repository Path**: mirrors_scijava/swing-checkbox-tree ## Basic Information - **Project Name**: swing-checkbox-tree - **Description**: Use check boxes in a Swing JTree. - **Primary Language**: Unknown - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2025-10-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![](https://img.shields.io/maven-central/v/org.scijava/swing-checkbox-tree.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.scijava%22%20AND%20a%3A%22swing-checkbox-tree%22) [![](https://github.com/scijava/swing-checkbox-tree/actions/workflows/build-main.yml/badge.svg)](https://github.com/scijava/swing-checkbox-tree/actions/workflows/build-main.yml) # Swing Checkbox Tree A check box tree package based on John Zukowski's [CheckBox Node Tree Sample](http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm) 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). * __License:__ [BSD-2](https://github.com/scijava/swing-checkbox-tree/blob/master/LICENSE.txt) * __Dependencies:__ None * __Maven Central:__ [org.scijava:swing-checkbox-tree](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scijava%22%20AND%20a%3A%22swing-checkbox-tree%22) * __Simple example:__ [CheckBoxTreeSample](https://github.com/scijava/swing-checkbox-tree/blob/master/src/test/java/org/scijava/swing/checkboxtree/CheckBoxTreeSample.java) * __Complex example:__ [WatchEventsFrame](https://github.com/imagej/imagej/blob/03a616522d31d9a1777880778cbd11f12f28e3e2/ui/swing/commands/src/main/java/imagej/ui/swing/commands/debug/WatchEventsFrame.java) 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](http://stackoverflow.com/a/12866094/1207769).