Java JTable Select disableSelection(JTable table)

Here you can find the source of disableSelection(JTable table)

Description

Disable any selections on a table.

License

Open Source License

Declaration

public static void disableSelection(JTable table) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    /**/*from   w w w  . j  a  va 2  s. c  o  m*/
     * Disable any selections on a table.
     */
    public static void disableSelection(JTable table) {
        table.setRowSelectionAllowed(false);
        table.setColumnSelectionAllowed(false);
        table.setCellSelectionEnabled(false);
        table.setFocusable(false);
    }
}

Related

  1. copyTableSelectionsToJList(JList list, JTable listTbl)
  2. createJCheckBoxForTable(boolean selected)
  3. getSelectedCase(JTable table)
  4. getSelectedObject(JTable table)
  5. getSelectionBackground(JTable t)
  6. invertSelect(JTable table)