import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * Write a description of class Button here. * * @author (your name) * @version (a version number or a date) */ public class Button extends Actor { public Button() { setImage(new GreenfootImage(" Try again ", 30, Color.BLACK, Color.RED)); } public void act() { if(Greenfoot.mouseClicked(this)) { CrabWorld gw = (CrabWorld) getWorld(); gw.removeObject(this); gw.removeObject(ScoreBoard); gw.removeObject(Counter); gw.removeObject(Lobster); gw.prepare(); } }}