title: Draw multiple squares in a Java JFrame and access each single one of them?
body: <p>I basically want to divide a 300 by 300 JFrame window into like 30 squares (without drawing them all separately) and be able to access each of the squares (maybe put them into an array/arraylist/stack/vector/etc). Is this possible without writing drawRect(x, y, width, height) 30 times? Thanks in advance. </p>