Example usage for javax.swing.table DefaultTableModel DefaultTableModel

List of usage examples for javax.swing.table DefaultTableModel DefaultTableModel

Introduction

In this page you can find the example usage for javax.swing.table DefaultTableModel DefaultTableModel.

Prototype

public DefaultTableModel() 

Source Link

Document

Constructs a default DefaultTableModel which is a table of zero columns and zero rows.

Usage

From source file:Visao.Outros.FRMRelatorio.java

private DefaultTableModel criaTabelaSaida() {
    DefaultTableModel dTable = new DefaultTableModel() {
        Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.Float.class,
                java.lang.String.class };
        boolean[] canEdit = new boolean[] { false, false, false, false };

        @Override/*  ww  w. ja v a  2  s  . c  o m*/
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        };

    };
    return dTable;
}