List of usage examples for javax.swing JTable setFocusable
public void setFocusable(boolean focusable)
From source file:Main.java
public static void main(String[] argv) throws Exception { int rows = 10; int cols = 5; JTable table = new JTable(rows, cols); table.setFocusable(false); table.setCellSelectionEnabled(false); }
From source file:Main.java
/** * Disable any selections on a table./*from w w w. ja va2 s .co m*/ */ public static void disableSelection(JTable table) { table.setRowSelectionAllowed(false); table.setColumnSelectionAllowed(false); table.setCellSelectionEnabled(false); table.setFocusable(false); }