Boa noite,
Tenho um medoto preencheCamposTabelaPet, quando clicar na tabela ele preenche meu formulario.
Tenho um JComboBox cliente que é de outra tabela.
Esta tudo funcionando o CRUD.
Mas quando tendo preencher comboBox cliente ao clicar na tabela ele não preenche, como faço para quando clicar ele preencher com o cliente que estou selecionando.
Segue abaixo o metodo preencher preencheCamposTabelaPet.
public void preencheCamposTabelaPet(){ try { int preencher = jtPet.getSelectedRow();
this.jlId_pet .setText(jtPet.getModel().getValueAt(preencher, 0).toString());
this.jtfNomePet .setText(jtPet.getModel().getValueAt(preencher, 1).toString());
this.jtfRacaPet .setText(jtPet.getModel().getValueAt(preencher, 2).toString());
this.jtfCorPet .setText(jtPet.getModel().getValueAt(preencher, 3).toString());
this.jtfPeloPet .setText(jtPet.getModel().getValueAt(preencher, 4).toString());
this.jtfIdadepet .setText(jtPet.getModel().getValueAt(preencher, 5).toString());
this.jtfImagem01Pet .setText(jtPet.getModel().getValueAt(preencher, 6).toString());
this.jtfObservcaoPet .setText(jtPet.getModel().getValueAt(preencher, 7).toString());
this.jcbCliente.setSelectedItem(jtPet.getModel().getValueAt(preencher, 8).toString());