It will help:

    add these lines after you add records in the model.

    Rectangle r = m_table.getCellRect(m_table.getModel().getRowCount()-1, 0,true);
    m_table.scrollRectToVisible(r);

- Bharat

----- Original Message -----
From: "ravi kanth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 22, 2001 10:19 AM
Subject: JTable and scrolling


> Hi,
>
> I have a JTable that is acting as a component that displays log messages. New log 
>messages are appended underneath previous
messages. After some time, the new messages will not be viewable as there are too many 
messages on the table, the user has to
manually scroll the JTable to view the new messages. How can I implement the JTable 
such that it scrolls itself automatically such
that the new messages are always viewable?
>
>
> _____________________________________________________
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.com
>
>
>
>
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to