Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MID Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.microedition.lcdui
Interface CommandListener

public interface CommandListener

This interface is used by applications which need to receive high-level events from the implementation. An application will provide an implementation of a Listener (typically by using a nested class or an inner class) and will then provide an instance of it on a Screen in order to receive high-level events on that screen.

The specification does not require the platform to create several threads for the event delivery. Thus, if a Listener method does not return or the return is not delayed, the system may be blocked. So, there is the following note to application developers:

- the Listener method should return immediately.

See Also:
  `Displayable.setCommandListener(javax.microedition.lcdui.CommandListener)`

Method Summary
`void` | `commandAction(Command c, Displayable d)` Indicates that a command event has occurred on Displayable d.

Method Detail

### commandAction

    public void commandAction(Command c,
                              Displayable d)

  Indicates that a command event has occurred on Displayable d.

  Note for application developer: the method should return immediately.

  Parameters:
    `c` - a Command object identifying the command. This is either one of the applications have been added to Displayable with `addCommand(Command)` or is the implicit `SELECT_COMMAND` of List.
    `d` - the Displayable on which this event has occurred

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MID Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a comment or suggestion Version 0.95 of MID Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.