package example;
//-*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
//@homepage@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public final class MainPanel extends JPanel {
    private static String[] columnNames = {"String", "Integer", "Boolean"};
    private static Object[][] data = {
        {"AAA", 0, true}, {"BBB", 1, false},
        {"CCC", 2, true}, {"DDD", 3, true},
        {"EEE", 4, true}, {"FFF", 5, false},
    };
    private final TableModel model = new DefaultTableModel(data, columnNames) {
        @Override public Class<?> getColumnClass(int column) {
            return getValueAt(0, column).getClass();
        }
    };
    public MainPanel() {
        super(new BorderLayout());
        final JTable table = new JTable(model);
        final TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model) {
            @Override public boolean isSortable(int column) {
                return false;
            }
        };
        sorter.setRowFilter(new RowFilter<TableModel, Integer>() {
            @Override public boolean include(Entry<? extends TableModel, ? extends Integer> entry) {
                return entry.getIdentifier() % 2 == 0;
            }
        });
        add(new JCheckBox(new AbstractAction("filter: idx%2==0") {
            @Override public void actionPerformed(ActionEvent e) {
                JCheckBox c = (JCheckBox) e.getSource();
                table.setRowSorter(c.isSelected() ? sorter : null);
            }
        }), BorderLayout.NORTH);
        add(new JScrollPane(table));
        setPreferredSize(new Dimension(320, 240));
    }
    public static void main(String... args) {
        EventQueue.invokeLater(new Runnable() {
            @Override public void run() {
                createAndShowGUI();
            }
        });
    }
    public static void createAndShowGUI() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException | InstantiationException
               | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }
        JFrame frame = new JFrame("@title@");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.getContentPane().add(new MainPanel());
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
}

@@ -243,22 +243,73 @@
 private 
-static
+MainPanel() %7B%0A        super(new BorderLayout());%0A%0A       
  String%5B
@@ -366,22 +366,11 @@
     
-private static
+   
  Obj
@@ -386,16 +386,20 @@
 ata = %7B%0A
+    
         
@@ -443,16 +443,20 @@
         
+ 
+   
 %7B%22CCC%22, 
@@ -491,16 +491,20 @@
         
+   
+ 
 %7B%22EEE%22, 
@@ -528,24 +528,28 @@
  5, false%7D,%0A
+    
     %7D;%0A    p
@@ -551,21 +551,11 @@
     
-private final
+   
  Tab
@@ -613,32 +613,36 @@
 ames) %7B%0A        
+    
 @Override public
@@ -672,32 +672,36 @@
 s(int column) %7B%0A
+    
             retu
@@ -749,75 +749,23 @@
     
-%7D%0A
     %7D
-;
 %0A    
-public MainPanel() %7B%0A        super(new BorderLayout())
+    %7D
 ;%0A  
@@ -770,22 +770,16 @@
         
-final 
 JTable t
@@ -812,22 +812,16 @@
         
-final 
 TableRow
@@ -1254,24 +1254,25 @@
     %7D);%0A
+%0A
         
 add(new 
@@ -1263,24 +1263,16 @@
         
-add(new 
 JCheckBo
@@ -1276,27 +1276,30 @@
 kBox
-(new AbstractAction
+ check = new JCheckBox
 (%22fi
@@ -1314,18 +1314,17 @@
 x%252==0%22)
- %7B
+;
 %0A       
@@ -1328,70 +1328,39 @@
     
-    @Override public void actionPerformed(ActionEvent e) %7B%0A   
+check.addActionListener(e -%3E %7B%0A
     
@@ -1363,25 +1363,24 @@
             
- 
 JCheckBox c 
@@ -1404,28 +1404,24 @@
 etSource();%0A
-    
             
@@ -1472,37 +1472,36 @@
  null);%0A        
-   
- 
 %7D
+);%0A
 %0A        %7D), Bor
@@ -1493,18 +1493,25 @@
         
-%7D)
+add(check
 , Border

use a lambda expression instead of an anonymous class(ActionListener)