public int getButtonIndex() {
        return button.getButtonId();
    }
The button index.

@return button index.

@see Joystick#assignButton(java.lang.String, int)
jme3-core/src/main/java/com/jme3/input/event/JoyButtonEvent.java