This J2ME tip describes a method that sets a command action whenever some changes are made in a list. The ItemMIDlet commandAction( ) method includes a case that detects the List selection change:

public void commandAction(Command c, Displayable d) {

  if (c == List.SELECT_COMMAND) {

    // Selection made in the IMPLICIT LIST

  } else {

    // Other cases not shown





 Related Tips