I am using AbstractTableModel I update the database it works find but I have to manually do another search to see the new database available seats. I try using model.fireTableDataChanged(); I need to refresh the Jtable manually when I book, but I would like it to do it asap when I book help please Thanks Lisa
The assignment doesn't require for the clients view of the data to be in sync with the database. If you want to update a row on your table, After you have updated the object collection in your abstract table model, call one of the following: fireTableDataChanged(); fireTableRowsUpdated( index, index ); The sencond one should be better and more efficient if you'd like to update a single row only... Hope this helps!!! Benjam�n
[This message has been edited by Benjam�n Amodio (edited May 09, 2001).] [This message has been edited by Benjam�n Amodio (edited May 09, 2001).]
I feel it is better to do a new search whenever you you need to display records since other user may have booked on the database. I assume you lock the database while you do the up-dating only. If you just update you user interface without get information from the database, the display may not be a real presentation of the database. The information is not upto-date. Therefore it makes more sense to do a new search everytime of the display. Please Comment. Ruilin