summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorLillian Angel <langel@redhat.com>2005-07-11 20:40:53 +0000
committerLillian Angel <langel@redhat.com>2005-07-11 20:40:53 +0000
commit9b774ad34452045b3763c19f283629e32518e00e (patch)
tree782f44aa70cdf10da4bf52bcd564d836963006bd /examples
parent981a13a57d9eb5b6b4430079c3971546515d70f8 (diff)
downloadclasspath-9b774ad34452045b3763c19f283629e32518e00e.tar.gz
2005-07-11 Lillian Angel <langel@redhat.com>
* examples/gnu/classpath/examples/swing/Demo.java (mkTree): fixed so the JTree appears properly.
Diffstat (limited to 'examples')
-rw-r--r--examples/gnu/classpath/examples/swing/Demo.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/gnu/classpath/examples/swing/Demo.java b/examples/gnu/classpath/examples/swing/Demo.java
index c29298a02..5abee7dcb 100644
--- a/examples/gnu/classpath/examples/swing/Demo.java
+++ b/examples/gnu/classpath/examples/swing/Demo.java
@@ -838,6 +838,12 @@ public class Demo
child2.add(child24);
JTree tree = new JTree(root);
+ tree.setRootVisible(true);
+ tree.setLargeModel(true);
+ DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
+ dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
+ tree.setSelectionModel(dtsm);
+
return tree;
}