I am creating a game and I added a start button, Then I thought that if the mouse clicks to button instead of pressing enter It would be much better.
private Actor btnStart;
btnStart = new Button(" Start "); // however you create it
addObject(btnStart, getWidth()/2, getHeight()/2);if (Greenfoot.mouseClicked(btnStart) { // etc.