• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
  • Himai Minh
  • Carey Brown
  • salvin francis

Make JTable With Images More Responsive?

Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • 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
  • 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.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic