Updating database from jtable

If the given name is not found in the database then it displays an error message and displays it by running the constructor.

updating database from jtable-60updating database from jtable-10updating database from jtable-35updating database from jtable-14

I want the table to get more records on the same employee id.

My code for refresh Button goes like this: int pos = record Selected Row(); int id = (Integer) record Model()Value At(pos, 0); List Selection Model selection Model = record Selection Model(); selection Selection Interval(pos, pos); String room Name = (String) record Value At(pos, 1); int room Charge = Integer.parse Int(record Model()Value At(pos, 2)String()); println(id room Name room Charge); record Table.revalidate(); record Table.repaint(); admin.update Room Type(id, room Name, room Charge); Are you sure about the database update?

Maybe your update button is updating the database, but there's no code to update the JTable at that point, so you don't see that it's updated?

I am trying to update database by editing cell values in jtable.

my table looks like When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this !