How do I make a Game Main Menu?

I already have a game… but how do I create a menu in start just like

Easiest way may be to grab Lemur and go from there.

An example game that sets up a menu (among other things):

But really if you just want a couple of buttons in a panel then this is really easy in Lemur:

Container myWindow = new Container();
myWindow.addChild(new Button("Start")).addClickCommands(new Comment<Button> {
        public void execute( Button b ) {
myWindow.addChild(new Button("Exit")).addClickCommands(new Comment<Button> {
        public void execute( Button b ) {

myWindow.setLocalTranslation(200, 400, 0);

Possibly even simpler if you use actions and ActionButton because then you can just call methods on your class directly.

1 Like

What happened?

You need to add slf4j jar to your project library
Did you read lemur dependencies ??
see Getting Started · jMonkeyEngine-Contributions/Lemur Wiki · GitHub


1 Like

Or you can go through the difficult, painful process of learning Nifty.
It’s not worth it for a small program though.


You must be using the now-ancient JME 3.0. If so then you need to use an older version of Lemur because the class signatures changed for Application between 3.0 and 3.1.

Lemur 1.7.1 was the last version to support 3.0.

OMG I dunno what happen

When you post exceptions, please include the stack trace.


hi, i’m a beginner. I have follow the tutorial but it’s not working, so i have an error “Uncaught exception thrown in Thread[jME3 Main,5,main]
NoClassDefFoundError: com/google/common/io/Resources”

what should i do? thanks

You need to add the Guava.jar library to your project, which is one of lemur’s dependencies


thanks, its working :smile:


Glad to hear, and welcome to the jme community! :slightly_smiling_face:

1 Like