public void setButtonValue( JoystickButton button, boolean isPressed ) {
            System.out.println( "Button:" + button.getName() + "=" + (isPressed ? "Down" : "Up") );
            setButtonValue( button.getLogicalId(), isPressed );
            lastButton = button;
        }
Easier to watch for all button and axis events with a raw input listener.
jme3-examples/src/main/java/jme3test/input/TestJoystick.java