/*
 * ResourceTable.java
 *
 * Created on 15. prosinec 2000, 10:56
 */

package timetable.gui;

/**
 *
 * @author  Administrator
 * @version 
 */
public class ResourceTable extends javax.swing.JTable {
    timetable.util.ExtendTableModel dataModel=null;
    javax.swing.JScrollPane scrollPane=null;
    
    /** Creates new ResourceTable */
    public ResourceTable(timetable.util.ExtendTableModel dataModel, javax.swing.JScrollPane scrollPane) {
        super(dataModel);
        this.dataModel = dataModel;
        this.scrollPane=scrollPane;
        
        scrollPane.setViewportView(this);
        
        javax.swing.table.TableColumn tableColumn;
        for (int c=0;c<dataModel.getColumnCount();c++) {
	    tableColumn = this.getColumnModel().getColumn(c); //getColumn(dataModel.getColumnName(c));
	    tableColumn.setPreferredWidth(dataModel.getColumnWidth(c));
        }
    }

}
