Here you can find the source of jtable$setAutoCreateRowSorter(JTable table)
public static void jtable$setAutoCreateRowSorter(JTable table)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; import javax.swing.JTable; public class Main { public static void jtable$setAutoCreateRowSorter(JTable table) { try {//from w ww . j a v a 2 s. c o m Method e = table.getClass().getMethod("setAutoCreateRowSorter", new Class[] { Boolean.TYPE }); e.invoke(table, new Object[] { Boolean.valueOf(true) }); } catch (Exception var2) { var2.printStackTrace(); } } }