Guest User

Untitled

a guest
Jul 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 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. }
  8. if (grid.isBroken() && grid.grid[x][y] == false) {
  9. grid.grid[x][y] = true;
  10. } else {
  11. grid.grid[x][y] = false;
  12. }
  13. }
  14. }
  15. gridParts.setVisible(false);
  16. gridParts.setVisible(true);
  17. }
Add Comment
Please, Sign In to add comment