JTable Non-Editable Cells

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) {
public boolean isCellEditable(int rowIndex, int colIndex) {
return false; // Disallow the editing of any cell

Related Posts:
How to Add JButton As JTable ColumnHeader
About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·