Java JTable Cell Editor cancelTableEditing(final JTable table)

Here you can find the source of cancelTableEditing(final JTable table)

Description

cancel Table Editing

License

Open Source License

Declaration

public static void cancelTableEditing(final JTable table) 

Method Source Code

//package com.java2s;

import javax.swing.JTable;

public class Main {
    public static void cancelTableEditing(final JTable table) {
        if (table.isEditing()) {
            int row = table.getEditingRow();
            int col = table.getEditingColumn();
            table.getCellEditor(row, col).cancelCellEditing();
        }/*from   w  w w  . j a  va  2  s . com*/
    }
}

Related

  1. createComboBox(Object items[], ActionListener listener, boolean editable)
  2. createEditableComboBox(String strActionCommand, ActionListener alListener, int iPreferredWidth)
  3. createTransclucentJTextAreaWithNoBorder(String text, boolean editable, boolean lineWrap, boolean wrapStyleWord)
  4. genHyperLinkEditor(final String uri, final Logger logger)