Thread: Menu item
View Single Post
Old 09-14-2009, 02:39 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: Jun 2009
Model: 7110
Carrier: engg.
Posts: 19
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Menu item

Please Login to Remove!

import net.rim.device.api.system.*;
import net.rim.device.api.ui.component.Dialog.*;
import net.rim.blackberry.api.menuitem.*;
import javax.microedition.pim.*;

public final class MenuItem extends Application {
private static long ID = 0x7cab1e23b72a0033L; //hash of

public static void main(String[] args) {
MenuItem app = new MenuItem();


MenuItem() {
ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();
amir.addMenuItem(ApplicationMenuItemRepository.MEN UITEM_ADDRESSBOOK_LIST, new SampleMenuItem());

static class SampleMenuItem extends ApplicationMenuItem
SampleMenuItem() {

public String toString() {
return "Give me more!";

public Object run(Object context) {

net.rim.device.api.ui.component.Dialog.alert("Hell o, you clikked the give me more menu item");

return null;

when run this program its show on console
Starting App
App is already running.
Offline   Reply With Quote