Hi all
Tell me, why i can not update data, after i edit record by selected the record in a table. Thanls a lot

btn.btnEdit.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
int response;
response=JOptionPane.showConfirmDialog(null,"Update a Category - Are you sure? ","",
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if(response==JOptionPane.YES_NO_OPTION)
{
buildObjectCat();
objBodtCat.updateRecord(objClsCat);
}
}
});

cat.jRadByAll.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
sql="select * from category ";
tab.jtable=objBodtCat.searchAll(sql);
tab.jsPane=new JScrollPane(tab.jtable);
displayTable();
}
});

public void displayTable()
{
if (tab.getComponentCount() != 0)
tab.removeAll();
tab.add(tab.jsPane);
tab.jtable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListSelectionModel rowSM=tab.jtable.getSelectionModel();
rowSM.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
JOptionPane.showMessageDialog(null,"Testing Table row: ","Seach",JOptionPane.INFORMATION_MESSAGE);
ListSelectionModel lsm=(ListSelectionModel)e.getSource();
showSelectedRow(lsm);
}
});
validate();

}
private void showSelectedRow(ListSelectionModel lsm)
{
int selectedRow =lsm.getMinSelectionIndex();
int numCols = tab.jtable.getColumnCount();
System.out.println("Display: "+numCols);
TableModel model=tab.jtable.getModel();
String stCatNo=model.getValueAt(selectedRow,0)+"";
String stCatDes=model.getValueAt(selectedRow,1)+"";
cat.jtfCategoryNo.setText(stCatNo);
cat.jtfDescription.setText(stCatDes);
// buildObjectCat();
}