?
Solved

JTree question

Posted on 2000-01-23
2
Medium Priority
?
277 Views
Last Modified: 2010-04-01
HOw can I tel my applet to display the second level nodes when it launches instead of the default root node??
0
Comment
Question by:tblackwe
2 Comments
 
LVL 1

Expert Comment

by:vivexp
ID: 2380328
Hi,

Visit this site for an example http://www2.gol.com/users/tame/swing/examples/JTreeExamples1.html 

Best of luck
0
 
LVL 1

Accepted Solution

by:
hilit earned 200 total points
ID: 2399681
Hi,

If you need to display all the nodes you can use the following command
public void expandPath(TreePath path) on your root.
You can really learn more at Sun's java tutorial :
http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month3 days, 11 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question