DedelaSardine
DedelaSardine

Reputation: 9

Jtree node expansion without selection

Is it possible to expand/collapse a node in a JTree without having it selected? (not highlighted)

Thanks a lot

Upvotes: 0

Views: 346

Answers (1)

SOA Nerd
SOA Nerd

Reputation: 941

You should be able to expand/collapse each node you care to by using the expand or collapse method. Here's a good example on javaalmanac.

http://www.exampledepot.com/egs/javax.swing.tree/ExpandAll.html

Upvotes: 1

Related Questions