I want to expand my Jtree nodes into multiple lines. Any idea for how to achieve this?
warlord902 9 Junior Poster
Recommended Answers
Jump to PostI've never tried this, but the nodes in JTree are rendered by default using JLabels.
You can put multi-line text in a JLabel by using simple HTML, so maybe you can use HTML to get multi-line nodes? Try a node with text like this:
<HTML>line 1a<BR>line1b<?HTML>
you never know...…
Jump to PostSorry, that's not something I've tried. I guess you'll just have to keep experimenting, unless anyone else has a better idea...?
Jump to PostPlease let us know how you get on - especially if you find a way to get it under Win L&F
J
All 16 Replies
mKorbel 274 Veteran Poster
warlord902 9 Junior Poster
mKorbel 274 Veteran Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
warlord902 9 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
mKorbel 274 Veteran Poster
warlord902 9 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
mKorbel 274 Veteran Poster
warlord902 9 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
warlord902 9 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
mKorbel 274 Veteran Poster
warlord902 9 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.