1

I currently have a JScrollPane in a JPanel. I have Images that are loaded into the JPanel from a database so the amount of Images that load varies.

I have set the JFrame that the JScrollPane is found on to a size of 800 * 800. Atm the pictures from the database just load on one massive line across the screen and the JScrollPane helps to see these but I would like to make a new break after three Images.

What would the best way be to go about this?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
user1060187
  • 957
  • 5
  • 12
  • 28

1 Answers1

4

Use GridLayout with 3 columns for the JPanel.

Jakub Zaverka
  • 8,816
  • 3
  • 32
  • 48