/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * published by the Free Software Foundation; either version 2.1 of
 * the license, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite
 * 330, Boston, MA  02111-1307, USA.
 * 
 */
package com.k_int.AdminApp.widgets;

import javax.swing.JTable;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;

/**
 * Title:		ColumnSizeableJTable
 * @author:		Rob Tice (rob.tice@k-int.com)
 * @version:	$Id: ColumnSizeableJTable.java,v 1.1 2004/11/15 13:47:50 rob Exp $
 * Copyright:	Copyright 1999-2004 Knowledge Integration Ltd
 * Company: 	Knowledge Integration Ltd
 * Description:
 * 
 * 
 * Created:		11-Oct-2004  16:25:32
 * 
 * 
 * History:		$Log: ColumnSizeableJTable.java,v $
 * History:		Revision 1.1  2004/11/15 13:47:50  rob
 * History:		*** empty log message ***
 * History:		
 *
 */
public class ColumnSizeableJTable extends JTable 
{
  
    public ColumnSizeableJTable(TableModel model)
    {
        super(model);  
    }
    
    public void setColumnWidth(int row, int size)
    {
        TableColumnModel colModel = getColumnModel();
        colModel.getColumn(row).setMinWidth(size);
        colModel.getColumn(row).setMaxWidth(size);
        colModel.getColumn(row).setPreferredWidth(size);
        colModel.getColumn(row).setWidth(size);
    }

}
