JTable cells are by default editable cells but some scenarios we need non-editable JTable.
Below code helps you to make non-editable JTable cells.
JTable table = new JTable(defaulttablemodel) {@Overridepublic boolean isCellEditable(int rowIndex, int colIndex) {return false; // Disallow the editing of any cell}};
Related Posts:
0 comments:
Post a Comment