// -*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
// @homepage@

package example;

import java.awt.*;
import java.util.Arrays;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

public final class MainPanel extends JPanel {
  private final String[] columnNames = {"String", "Integer", "Boolean"};
  private final Object[][] data = {
    {"aaa", 12, true}, {"bbb", 5, false},
    {"CCC", 92, true}, {"DDD", 0, false}
  };
  private final TableModel model = new DefaultTableModel(data, columnNames) {
    @Override public Class<?> getColumnClass(int column) {
      return getValueAt(0, column).getClass();
    }
  };

  private MainPanel() {
    super(new BorderLayout());

    JTable table = new JTable(model);
    table.setAutoCreateRowSorter(true);
    int index = 0;
    // table.getRowSorter().toggleSortOrder(index); // SortOrder.ASCENDING
    table.getRowSorter().setSortKeys(Arrays.asList(new RowSorter.SortKey(index, SortOrder.DESCENDING)));

    add(new JScrollPane(table));
    setPreferredSize(new Dimension(320, 240));
  }

  public static void main(String[] args) {
    EventQueue.invokeLater(MainPanel::createAndShowGui);
  }

  private static void createAndShowGui() {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
      ex.printStackTrace();
      Toolkit.getDefaultToolkit().beep();
    }
    JFrame frame = new JFrame("@title@");
    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    frame.getContentPane().add(new MainPanel());
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
  }
}

@@ -130,21 +130,26 @@
 va.util.
-Array
+Collection
 s;%0Aimpor
@@ -303,21 +303,64 @@
 private 
-final
+MainPanel() %7B%0A    super(new BorderLayout());%0A   
  String%5B
@@ -411,29 +411,17 @@
 an%22%7D;%0A  
-private final
+ 
  Object%5B
@@ -433,16 +433,18 @@
 ata = %7B%0A
+  
     %7B%22aa
@@ -481,16 +481,18 @@
 e%7D,%0A    
+  
 %7B%22CCC%22, 
@@ -524,28 +524,18 @@
 se%7D%0A
+  
   %7D;%0A  
-private final
+ 
  Tab
@@ -597,16 +597,18 @@
 ) %7B%0A    
+ 
+ 
 @Overrid
@@ -660,16 +660,18 @@
 %7B%0A      
+  
 return g
@@ -711,71 +711,18 @@
     
-%7D%0A
   %7D
-;%0A
 %0A  
-private MainPanel() %7B%0A    super(new BorderLayout());%0A
+  %7D;
 %0A   
@@ -931,17 +931,29 @@
 eys(
-Arrays.as
+Collections.singleton
 List

use Collections.singletonList(key) instead of Arrays.asList(key)