I'm creating an error/warning message table. Every time an error or
warning is generated, the row count increases by one and the value of
the newly added row value is set to the message.
However, when the new row is added, it is added to the bottom of the
list. The user is not aware that a new message is added unless they
scroll down to the bottom of the table.
Is there a way to add new rows to the top of the table (without doing
tons of shifting)
Or is there a way to set the focus to bottom of the table, so that if
more rows are added, the scroll will automatically scroll down to the
most recently added row?
Hope that makes sense.... any help is appreciated.
Andrey Kuznetsov - 28 Jun 2006 22:39 GMT
> I'm creating an error/warning message table. Every time an error or
> warning is generated, the row count increases by one and the value of
[quoted text clipped - 3 lines]
> list. The user is not aware that a new message is added unless they
> scroll down to the bottom of the table.
DefaultTableModel#insertRow(int row, Object [] rowdata);
Andrey

Signature
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Lionel - 28 Jun 2006 22:58 GMT
> I'm creating an error/warning message table. Every time an error or
> warning is generated, the row count increases by one and the value of
[quoted text clipped - 12 lines]
>
> Hope that makes sense.... any help is appreciated.
If you have some sensible order then you might consider looking at
extending AbstractTableModel. It makes life much easier.
Lionel.