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

Java examples for Swing:JTable Event

Description

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

Demo Code


//package com.java2s;

import javax.swing.event.TableModelEvent;

public class Main {
    /**//from  w w w . j a v  a 2  s .co  m
     * Returns a boolean indication whether the event represents a
     * insert type.
     * 
     * @param e the event to examine
     * @return true if the event is of type insert, false otherwise.
     */
    public static boolean isInsert(TableModelEvent e) {
        if (e == null)
            return false;
        return TableModelEvent.INSERT == e.getType();
    }
}

Related Tutorials