Have you tried:
SortedTableModel.fireTableDataChanged();
?
----- Original Message -----
From: "james yin" <jamesyin@p...>
To: "Professional Java" <pro_java@p...>
Sent: Monday, July 09, 2001 7:28 AM
Subject: [pro_java] "Profession Java Programming" JTable sort example help
> I am following the example in the book about the JTable sorting closely. I
> am trying to add the ability to add a row to the table model. I have
> modified the code so that I can add a row successfully. But I would like
> to clear the sorting mark in the tableheader so that it appears as no
> sorting after the row is added. The function call of
>
> SortedTableModel.clearSort();
> SortRenderer.columnSelect(-1);
>
> seems to do the job but the sorting mark does not go away until I resize
> the window. What else do I have to do so the table column can be
> refreshed? I have already try the following and neither one of them
worked:
>
> table.repaint();
> table.invalidate();
> table.revalidate();
>
> Please help, thanks.
>
> james
> jamesyin@p...
>
>