@Override
        public void onJoyButtonEvent(JoyButtonEvent evt) {
            setViewedJoystick( evt.getButton().getJoystick() );
            gamepad.setButtonValue( evt.getButton(), evt.isPressed() ); 
        }
Easier to watch for all button and axis events with a raw input listener.
jme3-examples/src/main/java/jme3test/input/TestJoystick.java