Results 1 to 2 of 2
  1. #1
    tommy is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default help with JScrollPane

    I have a table, base on the AbstractTableModel.
    Every minute there is an update on the table
    if the new rows are inserted on top of the table I don't want to see the data scrolling down, I would like to stay at the current scrolling position somewhere in the table.
    any ideas?

  2. #2
    katie is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    For achieving custom scrolling behavior in general, you should call scrollRectToVisible() method. For JTable, the value for the method argument could be gotten via getScrollableUnitIncrement() method.

Similar Threads

  1. JScrollPane with HTML
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-14-2008, 11:32 AM
  2. jscrollpane problem
    By monkey04 in forum AWT / Swing
    Replies: 2
    Last Post: 01-19-2008, 05:23 AM
  3. how to draw an image inside of jscrollpane
    By paty in forum Java Applets
    Replies: 1
    Last Post: 07-24-2007, 12:44 AM
  4. JScrollPane not scrolling
    By Riftwalker in forum Advanced Java
    Replies: 2
    Last Post: 07-17-2007, 08:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •