Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Make JTable With Images More Responsive?

Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic