Null pointer exception with FengGUI tabbing

I started to play around with FengGUI and ran into a null pointer exception. First off let me say that I turned tabbing back on by adding it to the FengJMEInputHandler:

case Keyboard.KEY_TAB:
      keyClass = Key.TAB;

I then made a frame with a text editor field and two buttons since I wanted to play with tabbing. (Side question: anyone know how to implement backwards tabbing with shit-tab?). I added a buttonPressedListener to the first button that removes the first frame. The second button exits the application.

What's strange is this works whenever I use the mouse to press the "close" button to remove the frame. It will also work if, after you've clicked on the text field, you move the mouse, than tab to the "close" button and hit enter. However, if you do not move the mouse after clicking on the text field, tab to the "close" button and press enter, as soon as you move the mouse again you get the following:

   at org.fenggui.TextEditor$3.mouseExited(
   at org.fenggui.ObservableWidget.mouseExited(
   at org.fenggui.Display.fireMouseMovedEvent(
   at FengJMEInputHandler$MouseListener.onMove(
   at com.jme.input.lwjgl.LWJGLMouseInput.update(
   at com.jme.input.InputSystem.update(
   at FengJME.main(

As soon as you move the mouse the exception occurs.

Here is the relevant FengGUI items I've done:

                frame1 = new Window();
      frame1.setXY(200, 200);
      frame1.setSize(300, 300);
      frame1.getContentContainer().setLayoutManager(new FormLayout());
      FormData fd = new FormData();
      TextEditor text = new TextEditor();
      text.setSize(100, text.getMinHeight());
      fd.left = new FormAttachment(0,0); = new FormAttachment(100,0);
      Button button1 = new Button("close");
      fd = new FormData();
      fd.left = new FormAttachment(0,0); = new FormAttachment(text,0);
      button1.addButtonPressedListener(new IButtonPressedListener() {
         public void buttonPressed(ButtonPressedEvent e) {
      Button button2 = new Button("exit");
      fd = new FormData();
      fd.left = new FormAttachment(0,0); = new FormAttachment(button1,0);
      button2.addButtonPressedListener(new IButtonPressedListener() {
         public void buttonPressed(ButtonPressedEvent e) {


Yeah, tabbing is still a bit premature in FengGUI yet. But we are working on it :slight_smile:

As for the NullPointerException; this should not happen of course and I already fixed it so that your code will not crash anymore with the newest FengGUI (which I will upload tomorrow I guess). But I can send you the most current jar by email if you like (my address is johannes.schaback "at"


Many thanks. Sending you e-mail presently.