@Override
                public void keyTyped(KeyEvent e) {
                    if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                        startApp(selectedClass);
                    } else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                        dispose();
                    }
                }
Code to create components and action listeners.

@param classes
           what Classes to show in the list box
jme3-examples/src/main/java/jme3test/TestChooser.java