{filelink=902}
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.RowFilter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
public class FiltrageJTable {
public static void main(String[] args) {
String nomColonne[] = { "Mois", "Valeur" };
Object[][] valeur = { { "Janvier", 0 }, { "Mares", 2 }, { "Ocrobre", 9 }, { "Decembre", 11 } };
TableModel model = new DefaultTableModel(valeur, nomColonne) {
public Class> getColumnClass(int column) {
return getValueAt(0, column).getClass();
}
};
JTable table = new JTable(model);
RowFilter