// the command for your class Command listCommand = new Command("click", CommandType.ITEM, 1); // your menu myList.append("item 1", null); myList.append("item 2", null); // setting the menu to use this command myList.setCommand(listCommand); // your implementation of commandAction public void commandAction(Command c, Displayable d) { // are we the list? if (d == myList && c == listCommand) { int selectedItem = myList.getSelectedIndex(); System.out.println("item " + selectedItem + " was clicked!"); } }