How do I make my button an image?

So I'm trying to make a main menu for a game I'm making, but I'll need images for the buttons. Unfortunately, when using the button() function and using all the appropriate stuff, the button works, but I can't make the button an image. If I try making the button an image, the button just displays "[Object] Object". Am I doing something wrong?

button = createButton(img5); button.position(100, 100); //test position, not final button.mousePressed(gotoGame);

Answers

Sign In or Register to comment.