hi

i have a list of files and folders in a jtable and i want to sort it

my code :

Java Code:
sorter = new TableRowSorter<TableModel>(myTableModel);
i have 2 problem

1.i sorted file by name for example,it sorted correctly but when i want to run a file,i can't because my arrays of files not refresh.

2.i write this code for icon image of files

Java Code:
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
           
            File file = myTableModel.getFile(row);
            setOpaque(true);
            setIcon(view.getSystemIcon(file)); 

            if (isSelected) {
                setBackground(table.getSelectionBackground());
            } else {
                setBackground(table.getBackground());
            }
            setText(file.getName());
            return this;
        }
but when i want to use it,i can't sort my table by name ; why?

excuse me my english is terrible

Thnx