> The table just shows log items. When a new log comes up, it will be
> inserted
> at the first row. So I call fireTableDataChanged method.
>
> How to avoid repeatly calling getValueAt?
> > The table just shows log items. When a new log comes up, it will be
> > inserted
[quoted text clipped - 8 lines]
>
> Tom Hawtin
Now I use fireTableRowInserted method. It also calls getValueAt
endlessly.
I only add two rows into the table. Look these output message.
>>>>>> Enter getValueAt, row = 0, col = 4
>>>>>> Enter getValueAt, row = 1, col = 0
[quoted text clipped - 15 lines]
>>>>>> Enter getValueAt, row = 0, col = 1
>>>>>> Enter getValueAt, row = 0, col = 2
.......................................................................
Tom Hawtin - 07 May 2007 04:19 GMT
> Now I use fireTableRowInserted method. It also calls getValueAt
> endlessly.
> I only add two rows into the table. Look these output message.
Literally endlessly? Are you sure you are not causing the table model to
fire events from getValueAt or causing repaints/revalidates in some
other way?
Tom Hawtin
Allen - 07 May 2007 04:43 GMT
> > Now I use fireTableRowInserted method. It also calls getValueAt
> > endlessly.
[quoted text clipped - 5 lines]
>
> Tom Hawtin
Sorry. I found the reason now. I used my custermized multiline
textarea cell renderer.
And I just overrided getTableCellRendererComponent method of
TableCellRenderer interface.
Now I change to use TextAreaRenderer download from
http://www.javaspecialists.co.za/archive/newsletter.do?issue=106&locale=en_US.
It is ok now.
Thank you!