Hey,
I have been using youtube to learn how to use the JPanel, as the prof has not given a lesson regarding that…
The project was a game, which I have finished, but for bonus I can do some sweet sweet graphics.
Anyhow the game saves the data in arraylists that chance as the game goes on…
I have figured out how to do most of what I want to do, but I need to a box for each item in the arraylist (which changes as u play the game, so I need the boxes to change in the panel.)
I set up a for loop (int I = 0: i<data1.size();i++) then setup an int x starting at 0 and after drawing a box, it adds 50 to x… and the x coordinate in the drawRect is set to the variable x…
however the x counter just sits at 0 so the boxes just stack…
So in short is there a way to draw some boxes in a line…. That as the arraylist length changes the boxes change as u play..?
Any help is greatly appreciated!
:)