Hey everyone, I have been creating a 2D tile map editor on and off for a while now but Im starting to have a bit of trouble implementing some things. Firstly, I want to be able to import tile images or something so i can create different style maps but im not sure how to import different images and where to place them if you know what i mean. Like right now i just have buttons that I click to switch to different tiles but its all static…
Also im trying to make a scrollable JPanel (the panel on which im drawing the tiles).
I have the class that extends JPanel which is put on the frame in the center of a JFrame that has a border layout, so it is resized to fit the screen. Im not quite sure how I could add the JScrollPane to the JPanel to make it work (I have tried quite a few things but nothing seems to work).