if (keyDoor1 == false) { g.setColor (Color.yellow); g.fillRect (101, 101, 9, 9); }