final ColorTableModel model = new ColorTableModel();
JTable table = new JTable(model);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setLayout(new BorderLayout());
table.setDefaultRenderer(Color.class, new ColorTableCellRenderer());
table.setDefaultEditor(Color.class, new ColorTableCellEditor());
table.setFillsViewportHeight(true);
JPanel buttonpanel = new JPanel();
buttonpanel.setLayout(new GridLayout(1,4));