So basically I'm writing a code and the backround has to change when it clicks "z", this is my code
public void changeImage() { if (Greenfoot.isKeyDown("z")){ setBackground("Pokemenu.jpg"); } }