Pessoal boa noite quero que quando uma table for clicada quero que retorne os dados da table em textField e em opçoes em checkbox
Mas os dados nao estao retornando os checkbos selecionado apresenta um erro:
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
int fila = jTable1.rowAtPoint(evt.getPoint());
jTable1.setSelectionBackground(Color.BLUE);
txtCodigo.setText(jTable1.getValueAt(fila, 0).toString());
txtNome.setText(jTable1.getValueAt(fila, 1).toString());
String dadoDaColuna2 = jTable1.getValueAt(jTable1.getSelectedRow(), 2).toString();
btnAvulso.setSelected(dadoDaColuna2.indexOf("Avulso")>=0);
btnContrato.setSelected(dadoDaColuna2.indexOf("Contrato")>=0);
jFormattedDataEntrada.setText(jTable1.getValueAt(fila, 3).toString());
jFormattedDataSaida.setText(jTable1.getValueAt(fila, 4).toString());
txtHoraInicio.setText(jTable1.getValueAt(fila, 5).toString());
txtHorarioFinal.setText(jTable1.getValueAt(fila, 6).toString());
txtResul.setText(jTable1.getValueAt(fila, 7).toString());
// String dadoDaColuna8 = jTable1.getValueAt(jTable1.getSelectedRow(), 8).toString();
// String dadoDaColuna8 = jTable1.getValueAt(jTable1.getSelectedRow(), 8).toString();
//retorna os dados da table selecionados em checkbox mas apresenta o erro
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
checkboxOutlook.setState(true);
check2.charAt((int) jTable1.getValueAt(fila, 9));
check3.charAt((int) jTable1.getValueAt(fila, 10));
check4.charAt((int) jTable1.getValueAt(fila, 11));
txtVisitas.setText(jTable1.getValueAt(fila, 12).toString());
}
`