I know its a very basic question I have checkboxes in my tables's first column Problem is checkboxes are not clickable.I have searched for similar threads and tried to assign the Boolean editor to the column and to override the getColumnClass()But I couldnt do it This is what I have tried so far
String[] columnNames = {"Column 1", "Column 2"};
DefaultTableModel model = new DefaultTableModel(columnNames, 0);
table=new JTable(model );
table.getColumnModel().getColumn(0).setCellRenderer( table.getDefaultRenderer(Boolean.class) );
ArrayList<org.jsoup.nodes.Element >arr=GetrowCount("http://www.mit.edu/");
for (org.jsoup.nodes.Element element : arr) {
Object[] rows = {Boolean.FALSE, element};
model.addRow( rows );
}
scrollPane=new JScrollPane(table);
panel.add(scrollPane);
this.add(panel);
this.setSize(300,300);