• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get creation time for adding a new row in jtable  RSS feed

 
Radek Gajdos
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone. My problem is that i can't get current time after each row added in the "Time of aplication" column. Every help is welcome. Peace!
Paul, your guess is very accurate, because i need to execute the "new Date()" code each time i add a new row to my JTable, and i don't know how to do this.
 
Paul Clapham
Sheriff
Posts: 22819
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I can't really tell what you are trying to do. And I can't tell why you don't like the code you wrote either. Perhaps you could clarify a bit?

In the meantime, as a guess let me suggest this: you already have code to get the current date and time (line 31 of your posted code). But it's only executed once, when your application starts. It's possible that you need to execute the "new Date()" code more frequently, i.e. each time you add a new row. But as I said I can't tell whether that's your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!