Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Update JTable when SQL DB changes ?  RSS feed

 
lakmal padmakumara
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have bond a JTable and a MySQL database.When the application loads Jtable populates it cells using mysql database.But my problem is I want to update my Jtable when i add a new entry to mysql table.I mean the update should be real time.At the moment what happens is I can only see new entries only after i close my application and restarts it !!!

So is there any way to solve this problem ?And also I want to have the vice versa functionality also.It means I when i update Jtable It should update sql database.

So if anyone can help me on this two problems ,it will be really helpful!!! Thanks !!!
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt that you can use database triggers for this, so then the only option would be to poll continuously. I doubt that's something you want though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!