• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable auto update itself  RSS feed

 
prakash moturu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i used JTable for displaying records in database table.when i am adding or updating or deleting the records .they doesnt appear in JTable.

so please provide sample code for the following requirement.

JTable auto update it self as soon as the actual mysql table hasbeen updated.

thanks in advance.
bye
Prakash
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> so please provide sample code for the following requirement.

your 'request' may be a translation hiccup, but not your cross-posting.

for do-it-for-me posts, mosey on over to rent-a-coder
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either you'll have to monitor the table in intervals or you will have to make the database engine trigger an update.

The former will have the problem of being CPU intensive if the interval becomes too small, or not receiving updates in time if they are too large.

I don't know if the latter can be done, and if so how.
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Prime:
I don't know if the latter can be done, and if so how.
I am not convinced it is possible; the idea behind JDBC is that Java code interrogates the database, not that the database sends messages to the Java application.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prakash moturu:

JTable auto update it self as soon as the actual mysql table hasbeen updated.


How is the DB data being updated? Through your UI or external to your UI?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!