Help with pictures en Java
Recently, I found that initialzing a new ImageIcon in the paint function is a terrible thing to do, as it will always look for the image which will slow the game down and/or flicker.
So the solution to this problem is to define the ImageIcon in the class, and call the picture in public void init or something.
However, would I have to do this process for 100++ pictures? I tried to use and array to load all my pictures, but then I had a problem finding the one I needed. Is there another solution to stop the game from being so slow/flickering?
Or just a better way to do this in general?