Question

Im making a Java application which views a set of images within a timeline. My Idea was to use a JScrollPane with the set of all images set out in a grid-layout, but rather than scrolling the pane using the traditional scroll bars, I wanted to use something like a JSlider.

The purpose of this is to give the user more control and idea of the time at which the subset of images is shown and to give greater effect of a timeline. I have produced a simple visual example of my idea below:

enter image description here

I wondered whether this was even possible as I have not seen any similar examples after extensive research. Any help with any possible solutions is greatly appreciated.

Many thanks.

Was it helpful?

Solution

Some ideas: Put the images into a JPanel and this JPanel into a JScrollPane without scroll bars at all. Then sync the slider (ChangeListener) with the JViewPort.

Or (simpler) use the horizontal scroll bar as the slider and custom a JScrollBar with the labels.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top