[HELP] Updating/Refreshing JTable connected to database

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 8118 Views - Last Post: 02 January 2013 - 01:17 AM Rate Topic: -----

#16 mr.nacho  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 89
  • Joined: 28-December 12

Re: [HELP] Updating/Refreshing JTable connected to database

Posted 02 January 2013 - 01:17 AM

View Postpbl, on 29 December 2012 - 09:50 AM, said:

I think just one line missing :)/>
You have to inform the JTable that it has to redraw itself
      model.columnNames = fieldNames;  
      model.rowData = data;  

      table.tableChanged(new TableModelEvent(model));



Sir, it's now working. Thanks for the help. :) What I did is everytime I interact with the table/model, I call connection to database. Thanks.

View Postpbl, on 29 December 2012 - 09:50 AM, said:

I think just one line missing :)/>
You have to inform the JTable that it has to redraw itself
      model.columnNames = fieldNames;  
      model.rowData = data;  

      table.tableChanged(new TableModelEvent(model));



Sir, it's now working. Thanks for the help. :) What I did is everytime I interact with the table/model, I call the connection to database without the driver and connection. Thanks.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2