Lazy loading gallery with Java Swing

From web pages this is a well known issue: You have an image gallery with many rows of pictures. Only part of them are visible in the browser. So the first images that should be loaded are the ones that are visible. With the browser technology this is not a big deal, as each resource (image) is loaded in a separate request, so the images at the top are requested first and you can start looking at the images and, when you scroll down the ones below will be loaded already.

With a desktop application this is a bit different, as you have to do something to achieve reasonable loading times. With a desktop application the the user interface is completely defined before displaying. Imagine you have loads of images that are to be loaded: The loading from your drive takes time and consumes memory. The first issue can be resolved by loading the images asynchronously, so the UI is not blocked while the images are loaded. However you might also save memory by only keep the images that are displayed in memory. This article shows how I achieved this:

„Lazy loading gallery with Java Swing“ weiterlesen

Image Gallery with Swing

I have a list of list of images which I would like to display so I can decide what to do with them. The structure of List of List is because similar images compose the inner list. The images of the inner list should be displayed in a row whereas the outer list are the different rows. „Image Gallery with Swing“ weiterlesen