Printable View
I have a JTable which has a loop that adds rows with: Code: model.addRow(new Object[]{"", add(readThis), fromArray[i], subjectArray[i], dateArray[i], "NA"}); How can I put a checkbox into the row. If I try add(checkboxname) it won't work. I also need to know how to make each cell uneditable except for the first column.
model.addRow(new Object[]{"", add(readThis), fromArray[i], subjectArray[i], dateArray[i], "NA"});
This should answer all your questions. How to use JTable
Code: public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } I do not understand how that makes new boolean ("false") into a checkbox yet new JButton("test") wont work
public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); }