JTREE - DefaultMutableTreeNode

How to cast from DefaultMutableTreeNode to INTEGER?

I set :

DefaultMutableTreeNode node =new DefaultMutableTreeNode(rs.getInt("task_id"));

then in the renderer I want to take this id as INTEGER, but I get error:

java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode

this line in the renderer with error:

Integer id = (Integer) value;

[452 byte] By [yael800a] at [2007-11-26 16:50:57]
# 1
Use node.getUserObject() for this
Liaskovich_Viktara at 2007-7-8 23:18:37 > top of Java-index,Desktop,Core GUI APIs...
# 2
Where? In the renderer?I want to add in the renderer enother text (to the JLable) where is the id value.Do you have an example?Thanks :)
yael800a at 2007-7-8 23:18:37 > top of Java-index,Desktop,Core GUI APIs...
# 3
Yes, (Integer)value.getUserObject()
kirillga at 2007-7-8 23:18:37 > top of Java-index,Desktop,Core GUI APIs...