Is there a way to change multiple items? [Hard to describe, example inside]
<p>I'm struggling a bit in how to put this into words coherently, so I'll just use an example and hope it gets the message across.</p>

<p>Take the game Othello (Reversi) for example. I can program the logic behind the game, that is to say I can determine which pieces are to have their colors changed after each turn.</p>

<p>Let's say I've got 64 panels on a JFrame, each one representing a position on the Othello board. After a turn ends, I determine that panels 5 and 6 need to have their colors changed.</p>

<p>What I would like to be able to do is pass 5 and 6 via an array, let's say, and have a for-loop that runs through the array.</p>

<pre><code>for(int i=0; i &lt; array.length; i++){
   change the image at array[i]
}
</code></pre>

<p>And, thus, only check for and make changes at the 2, in this example, places I need changed. Saving quite a bit of time writing code.</p>

<p>What I currently have to do is have a for-loop and inside the for-loop I have 64 if-else statements, saying</p>

<pre><code>if(panel == 5){
    change the image at 5
}
etc.
</code></pre>

<p>I hope this successfully got across what I was trying to ask. If not, I'd be more than happy to clarify.</p>
