Estou desenvolvendo uma aplicação java para desktop e gostaria de que quando eu clicasse na linha de uma JTable preenchesse os campos e selecionasse os checkbox de acordo com os dados das colunas da linha selecionada. Mas ao clicar na linha ele preenche os somente os campos e não seleciona os checkbox.
Minha jTable com os dados
Meus campos com os checkbox
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
int index= jTable1.getSelectedRow();
TableModel model=jTable1.getModel();
int fila = jTable1.rowAtPoint(evt.getPoint());
jTable1.setSelectionBackground(Color.BLUE);
txtVisita.setText(jTable1.getValueAt(fila, 0).toString());
txtDescricao.setText(jTable1.getValueAt(fila, 1).toString());
jFormattedDataEntrada.setText(jTable1.getValueAt(fila, 2).toString());
jFormattedDataSaida.setText(jTable1.getValueAt(fila, 3).toString());
txtHoraInicio.setText(jTable1.getValueAt(fila, 4).toString());
txtHorarioFinal.setText(jTable1.getValueAt(fila, 5).toString());
txtResul.setText(jTable1.getValueAt(fila, 6).toString());
String coluna7= jTable1.getColumnName(7).toString();
String coluna8=jTable1.getColumnName(8).toString();
String coluna9=jTable1.getColumnName(7).toString();
String coluna10=jTable1.getColumnName(7).toString();
if(coluna7==""){
checkboxWord.setSelected(false);
}
else{
checkboxWord.setSelected(coluna7.indexOf("Word")>=0);
}
if(coluna8==""){
checkboxExcel.setSelected(false);
}
else{
checkboxExcel.setSelected(coluna8.indexOf("Excel")>=0);
}
if(coluna9==""){
jCheckBoxPower.setSelected(false);
}
else{
jCheckBoxPower.setSelected(coluna9.indexOf("PowerPoint")>=0);
}
if(coluna10==""){
jCheckBoxOutllok.setSelected(false);
}
else{
jCheckBoxOutllok.setSelected(coluna10.indexOf("Outlook")>=0);
}
txtVisitas.setText(jTable1.getValueAt(fila, 11).toString());
}


