public RosterView() {
        setLayout(new BorderLayout());
        setPreferredSize(new Dimension(250, 200));
        String[] headerStr = { "Student", "In-Class", "Allow 2 Draw", "Question" };
        int[] columnWidth = { 100, 150, 100, 50 };

        SortableTableModel dm = new SortableTableModel() {
            public Class getColumnClass(int col) {
                switch (col) {
                    case 0:
                        return String.class;
                    case 1:
                        return String.class;
                    case 2:
                        return String.class;
                    case 3:
                        return Boolean.class;
                    default:
                        return Object.class;
                }
            }

            public boolean isCellEditable(int row, int col) {
                switch (col) {
                    case 1:
                        return false;
                    default:
                        return true;
                }
            }

            public void setValueAt(Object obj, int row, int col) {
                switch (col) {
                    case 2:
                        super.setValueAt(new Integer(obj.toString()), row, col);
                        return;
                    default:
                        super.setValueAt(obj, row, col);
                        return;
                }
            }
        };

        dm.setDataVector(
                new Object[][]
                        {
                                {"Doe, John", "true", "false", new Boolean(false)},
                                {"Eve, Linda", "true", "true", new Boolean(false)},
                                {"Jim, Frank", "true", "false", new Boolean(false)},
                                {"Pam, Jack", "true", "false", new Boolean(true)},
                                {"Adam, James", "false", "false", new Boolean(false)},
                        }, headerStr);

        JTable table = new JTable(dm);
        //table.setShowGrid(false);
        table.setShowVerticalLines(true);
        table.setShowHorizontalLines(false);
        SortButtonRenderer renderer = new SortButtonRenderer();
        TableColumnModel model = table.getColumnModel();
        int n = headerStr.length;
        for (int i = 0; i < n; i++) {
            model.getColumn(i).setHeaderRenderer(renderer);
            model.getColumn(i).setPreferredWidth(columnWidth[i]);
        }

        JTableHeader header = table.getTableHeader();
        header.addMouseListener(new HeaderListener(header, renderer));
        JScrollPane pane = new JScrollPane(table);
        add(pane, BorderLayout.CENTER);
    }