/** * Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b. * * @param e the key event */ public void keyReleased(KeyEvent e) { ((KeyListener) a).keyReleased(e); ((KeyListener) b).keyReleased(e); }
/** * Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b. * * @param e the key event */ public void keyPressed(KeyEvent e) { ((KeyListener) a).keyPressed(e); ((KeyListener) b).keyPressed(e); }