File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
JTree reduce indent for leaf node
Joined: Feb 20, 2007
Nov 13, 2009 16:19:15
indents the leaf nodes more then a normal node. I want to override this action and get all the children aligned, irrespective of node type.
what jtree does by default
where child3 is a leaf node
what I want is
Waiting for your reply.
Joined: Jun 13, 2009
Nov 13, 2009 19:34:56
Don't you have the answer from the other posting you hijacked?
Seems to me lack an indent of 0 does what you want.
If it doesn't work then you will need to write your own UI. So look at the code to see where those
properties are used and then customize it for your requirements.
If you need further help then you need to create a
SSCCE (Short, Self Contained, Compilable and Executable, Example Program)
, that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: JTree reduce indent for leaf node
Jtree child selection problem
JTree last selected path component is giving null
URGENT :- Creating JTree
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014