Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2014 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 Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)
  * which accompanies this distribution, and is available at http://creativecommons.org/licenses/by-nd/4.0/
  *
  * Contributors:
  *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - RMI Client, FileChooser and WebDAV
  */
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