Hi,

For Table Tree, use setOpenIcon, setLeafIcon and setCloseIcon instead of
setIcon.  Depending on the state of the tree node, the icon will be set.
You can also set the same icon for all the state.

thanks,
William.

On 12/17/06, Pankaj Patro <[EMAIL PROTECTED]> wrote:

hi ,

//*Problem : Cell renderer is not working, (what image I am setting for a
particluar cell it is not showing)*

I am setting a image Icon to 2nd column of my table tree application.
There I am using *D**efaultTableTreeCellRenderer,*  my renderer classes is
given below
*

public
* *class* *CellRenderer* *extends* DefaultTableTreeCellRenderer {

*public* IRendererComponent getTableTreeCellRendererComponent(ULCTableTree
table, Object value, * boolean* arg2, *boolean* arg3, *boolean* arg4, *boolean
* arg5, Object arg6) {

setIcon(IconFactory.*getIcon*(
"E:/eclipse/workspace/TmxMPApplicationAlpha/server/images/up-icon.gif"));
*// this Icon is exist in my system & path is correct*

setVisible(*true*);

*return* *super*.getTableTreeCellRendererComponent(table, value, arg2,
arg3, arg4, arg5, arg6);

}

}

*/***

in this class i m setting my renderer class to 2nd column,

*public* void start() {**

rootPane = getRootPane();

*DriveListTreeTableModal listTableTree = *
*new** DriveListTreeTableModal();*

ULCTableTree tableTree =
new ULCTableTree(*listTableTree*);

tableTree.getColumnModel().getColumn(1).setCellRenderer*(*
*new** CellRenderer());*

ULCScrollPane scrollPane =
new ULCScrollPane(*tableTree*);

rootPane.add(scrollPane);

rootPane.setVisible(true);

*}*

***/*

*Problem : Cell renderer is not working, (what image I am setting for a
particluar cell it is not showing*

*please help me, how to work it out or is there any alternative solution
for it.*

**

Reply via email to