Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  *  Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the GNU Lesser Public License v2.1
  *  which accompanies this distribution, and is available at
  *  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  *
  *  Contributors:
  *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - initial API and implementation
 */
package de.ipk_gatersleben.bit.bi.edal.rmi.client.gui;
The EDALTableModel can be set up to display any data model which implements the TableModel interface with a couple of lines of code:

   EDALTableModel myData = new EDALTableModel(data,columnNames); 
   JTable table = new JTable(myData);
  

we implement this class only because we want to make the table is readonly, so the isCellEditable function return false

Author(s):
Jinbo Chen
Version:
1.0
public class EdalTableModel extends DefaultTableModel{
	private static final long serialVersionUID = 1L;
	public EdalTableModel(Object[][] dataObject[] columnNames)
	{
		super(datacolumnNames);
	}
	public boolean isCellEditable(int rowIndexint columnIndex) {
		return false;
	}
New to GrepCode? Check out our FAQ X