title: Move icon from jbutton to jbutton
body: <p>I setup a gridlayout, with 16 buttons in the center. I placed an icon on the first button.</p>
  
  <p>How would I loop through, and when the user select the next button on the grid, it moves the icon from old position to new position?</p>
  
  <pre><code>private ArrayList&lt;JButton&gt; grid = new ArrayList&lt;JButton&gt;(); 
  
  JPanel gridBtnPanel = new JPanel();
  gridBtnPanel.setLayout(new GridLayout(4, 4));
  for(int i = 0; i &lt;= 16; i++){
      JButton innerButton = new JButton();
      gridBtnPanel.add(innerButton);
      grid.add(innerButton);
  }
  
  ImageIcon player= new ImageIcon("player.JPG");
  
  //starting position     
  grid.get(0).setIcon(player);
  
  //wanting to move to next button when I select the near by button       
  for(int i = 0; i &lt; grid.lastIndexOf(theifPerson); i++){
      grid.get(i).setIcon(null);
  }
  </code></pre>
  
  <p>Any help would be great.</p>
  
  <p>Thank you.</p>