• Post Reply Bookmark Topic Watch Topic
  • New Topic

Make JTable With Images More Responsive?  RSS feed

 
Marcus Hathaway
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm interested to see if anybody has any thoughts on how I may make a JTable with images more responsive on screen.

Basically, one of the columns of my table is for images. The images come from locations of the web. All this is dynamic, so the images may constantly be changing etc.

On loading/refreshing the JTable it sometimes looks a tad sluggish, which is understandable considering its having to pull these images from the web somewhere. Once the images have loaded, the feel of the screen remains a little unresponsive in what you would normally expect.

I've made minor changes such as controlling the size of the image etc but am wondering what's the best way to go to improve the screens performance? Would using threads be something to consider? Searching the net i'm also reading things about a dynamic layout...but am struglging to find some concrete information to form an opinion on this.

Any thoughts would be greatly appreciated!
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create Thread to get all images. When all the Images are fetched ( put in Vector or something like it ) make a own Renderer to make the images visible.

When the Threads run method has got the last image. Call the fireTableStructureChanged. Try extending the AbstractTableModel class to update the JTable.

If you got your own renderer perhaps repaint() will do the trick but i doubt it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!