i want to linked JSpinner with JTable. if i want to click a row in JTable, value in JSpinner change with value in that row JTable. I have source code like this :
void select(){
try{
int row = TabelKebutuhan.getSelectedRow();
txtJumlahButuh.setValue(TabelKebutuhan.getModel().getValueAt(row,0).toString());
txtJumlahAda.setValue(TabelKebutuhan.getModel().getValueAt(row,1).toString());
}catch(Exception e){}
}
but, thats source code can't work like i want. so, what the solution for this case?