Results 1 to 4 of 4

Thread: baseTableModel.refresh()

  1. #1
    Join Date
    Nov 2004
    Location
    IL, USA
    Posts
    61

    Default baseTableModel.refresh()

    I have table which shows values from a list of beans. In my case I am replacing a bean in my List of beans. I need to refresh the table to display replaced record, would you consider to add "refresh" method to the BaseTableModel?

    The method would be ...

    public void refresh() {
    fireTableDataChanged();
    }

    Or may be I am wrong, may be there are other methods? Please let me know.
    Thank you.

  2. #2
    Join Date
    Aug 2004
    Posts
    203

    Default

    I use setRows

    regards

  3. #3
    Join Date
    Nov 2004
    Location
    IL, USA
    Posts
    61

    Default

    Yes, but in my case I need to

    setRows(null)

    and

    setRows(rows)

    because just applyint setRows(rows) does not understand the change because list object stays the same.

  4. #4
    Join Date
    Aug 2004
    Posts
    203

    Default

    I change BaseTableModel#setRows like this :
    public void setRows(List rows) {
    /*if (this.rows == rows) {
    return;
    }
    if (rows == null) {
    this.rows = new ArrayList();
    } */
    this.rows = rows;
    fireTableDataChanged();
    }

    this is probably for performance, but it isn't good for me

    regards

Posting Permissions

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