I Have array of JButtons if a 8x8 grid I want to click a button and change the icon of another in the grid (not the one clicked), I dont seem to be able to access the array outside the mouse listener.
//cant access this why?
private JButton but = new JButton;
private class MyMouseAdapter extends MouseAdapter
public void mouseClicked(MouseEvent event)
JButton button = (JButton)event.getSource(); // this gets the clicked button but
Any help would be great