• Post Reply Bookmark Topic Watch Topic
  • New Topic

Refresh Long in JTable  RSS feed

Charlie Brave
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
I'm dealing with a JTable that shows the progress of a certain number of ftp transfers: elapsed time, throughput, percent and all that stuff.
Firing a TableDataChanged event within a Timer refresh the values displayed on the JTable well, except in the case of the amount of bytes already transferred. This is because that value it's a Long (wrapper), but there's no way to change the long (primitive) value of the Long wrapper since it is created. I've to create a new Long object everytime I check the transfer progress. So I think by doing that I've lost the reference to the original Long object, so the value it's never refreshed.
I've been thinking about creating my own wrapper class for the copied-size long value, with a setLong(long l) method (i've already got a similar class representing percentile values). But I want to know if I've missing something, if there's a solution based on already existent API's classes. I'm using 1.4.1 SDK rigth now. It's hard to me to believe that there's no way to change the primitive value of a wrapper. Any ideas?
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!