문제

I have a custom checkbox node tree . The structure is like this .

enter image description here

You can notice that the subtree is drawn from the check box node tree.

And what i need is ,

enter image description here

The sub tree must be drawn under the folder icon and not the check box.

Please guide me on this regard .

도움이 되었습니까?

해결책

You are using a custom TreeCellRenderer? Just indent it, i.e. add padding to the left which has the width of the folder icon. If you are not using a custom TreeCellRenderer: That is the way to go.

다른 팁

Add One as a leaf (like Two and Three). The tree does not make sense otherwise.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top