If you want all the leaf nodes to be displayed with the folder icon, you can
use:

DefaultTreeCellRenderer renderer=yourTree.getTreeCellRenderer();
renderer.setLeafIcon(renderer.getClosedIcon());

If you want only certain leaf nodes to be displayed this way, you might have to
write a custom
TreeCellRenderer.  If this is the case, send me some more mail, and I'll walk
you through it.

-KC






"Pradeep, Chinnaswamiah" <[EMAIL PROTECTED]> on 07/20/2001 07:38:54 AM

Sent by:  "Pradeep, Chinnaswamiah" <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:    (KC Eilander/MTN/US/3Com)
Subject:  Problem with JTree.



Hi ,

     Is there a method to display a node as a folder even if the folder contains
no subfolders or files (nodes) ?
     If  a  folder contains no subfolders or nodes the folder appears as a node
in the JTree. How can I change the look of this to folder ? Any specific
function in the API  or  workarounds would be appreciated.

Thanks in advance
Pradeep
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing




_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to