Returns a boolean indication whether the event represents a structureChanged type in JTable. - Java Swing

Java examples for Swing:JTable Event

Description

Returns a boolean indication whether the event represents a structureChanged type in JTable.

Demo Code


//package com.java2s;

import javax.swing.event.TableModelEvent;

public class Main {
    /**//from w ww .j  av a 2 s.  com
     * Returns a boolean indication whether the event represents a
     * structureChanged type.
     * 
     * @param e the event to examine.
     * @return true if the event is of type structureChanged or null, false
     *         else.
     */
    public static boolean isStructureChanged(TableModelEvent e) {
        return e == null || e.getFirstRow() == TableModelEvent.HEADER_ROW;
    }
}

Related Tutorials