Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: "Profession Java Programming" JTable sort example help


Message #1 by "james yin" <jamesyin@p...> on Mon, 9 Jul 2001 07:28:17
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...
>
>


  Return to Index