package com.tutego.insel.ui.table;

import javax.swing.*;
import javax.swing.table.*;

public class QuadratColumn
{
  public static void main( String[] args )
  {
    TableModel model = new QuadratTableModelComplex();

    JTable table = new JTable();
    TableCellRenderer renderer = new ColoredTableCellRenderer();
    table.setDefaultRenderer( Long.class, renderer );
    table.setModel( model );

//    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
//
//    JTableHeader header = table.getTableHeader();
//    header.setUpdateTableInRealTime(true);
//    header.addMouseListener( new QuadratTableModelComplex.ColumnListener(table) );
//    header.setReorderingAllowed(true);

    JFrame frame = new JFrame();
    frame.getContentPane().add( new JScrollPane(table) );
    frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    frame.pack();
    frame.setVisible( true );
  }
}
