I am working on generating semi-random images for a map for a game im making. Right now im trying to figure out how to move around my JPanel using scroll bars for now. I cant figure out how exactly to place them so that i can move around and check an image that is larger then my monitor's resolution (which is 1920 x 1080). What would be the best way to make it so i can do this?
1) Use a proper layout manager. BorderLayout suggests itself. The BorderLayout.CENTER attribute will try to fill up your screen
2) Put the Image in a JLabel 3) Add the image to JScrollPane 4) Add the JScrollPane to the container with the border layout.
I will move this topic over to the GUI forums, where Swing questions are usually discussed