Is it sensible to code anything in the contructor of
a CellEditor and a CellRenderer of a JTable.
I'm asking this question because i tried to attach a
focus listener to the renderer but it did not respond
to the focus lost or focus gained.
Apart from that i tried to add a keylistener to the
editor as well as renderer but i dont get any response.
If i'm not wrong the Cell Renderer is actually just a
'rubber stamp' of the component that enables how
the data should appear in the Jtable.
On the other hand Cell Editor is the one which actually
lets you change the value in the Jtable
(in the component's manner ... meaning if checkbox
-> true,false so on...)
My actual problem is that i want to add an excel like
feature to my Jtable. ie. when you start writing inside
any cell, the previous contents are erased. Currently,
when you write something in the cell .. it gets appended.
I tried to invoke a selectAll() in my CellEditor (since
my
cell editor extends JTextField) but it didn't work.
It
simply deselects the selected text and starts appending
text.
Can anyone help me out ?
regards
abhay
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________
