Guest User

Untitled

a guest
Jul 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public void actionPerformed(ActionEvent e) {
  2. System.out.println("Working");
  3. for (int x = 0; x < 10; x++) {
  4. for (int y = 0; y < 10; y++) {
  5. if (e.getSource() == imageParts[x][y]) {
  6. System.out.println("Pressed" + x + "" + y);
  7. if (grid.grid[x][y] == false) {
  8. grid.grid[x][y] = true;
  9. btn.setBackground(Color.black);
  10. } else {
  11. grid.grid[x][y] = false;
  12. btn.setBackground(Color.white);
  13. }
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment