Java JTable Cell Editor setClickCountToStartEditing(JTable table, int count)

Here you can find the source of setClickCountToStartEditing(JTable table, int count)

Description

set Click Count To Start Editing

License

BSD License

Declaration

public static void setClickCountToStartEditing(JTable table, int count) 

Method Source Code

//package com.java2s;
// LICENSE:      This file is distributed under the BSD license.

import javax.swing.*;

import javax.swing.table.TableCellEditor;

public class Main {
    public static void setClickCountToStartEditing(JTable table, int count) {
        for (int columnIndex = 0; columnIndex < table.getColumnCount(); ++columnIndex) {
            TableCellEditor cellEditor = table.getColumnModel().getColumn(columnIndex).getCellEditor();
            if (cellEditor instanceof DefaultCellEditor) {
                ((DefaultCellEditor) cellEditor).setClickCountToStart(count);
            }/*from  www. j a v  a  2s . co  m*/
        }
    }
}

Related

  1. installSimpleRenderesAndEditors(JTable table)
  2. isEditable(Component comp)
  3. processEditorRemovel(JTable aTable)
  4. setCellEditor(JTable table, int columnIdx, TableCellEditor editor)
  5. setCharacterAttributes(final AttributeSet attr, final boolean replace, final JEditorPane editorPane, final StyledDocument doc, final MutableAttributeSet inputAttrs)
  6. setClickCountToStartEditing(JTable table, int count)
  7. setDefaultTableEditorsClicks(JTable table, int clickCountToStart)
  8. setEditable(JSpinner spinner, boolean bool)
  9. setEditable(JTextComponent component, boolean editable)