View Single Post
Old 02-05-2010, 01:03 AM   #1 (permalink)
sam04
New Member
 
Join Date: Jan 2010
Model: 8520
PIN: N/A
Carrier: airtel-india
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Create Menu and Add this in Existing BB application??

Please Login to Remove!

hi...i am creating new Menu and trying to Add in Existing BB application...can any one tell me ..how to add menu in Existing BB application???

i wrote code for this but i am not getting exact solution

import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.container.MainScreen;

public class CreateMenu extends UiApplication {

public static void main(String args[]) {
CreateMenu theApp = new CreateMenu();
theApp.enterEventDispatcher();
}
}

class CreateMenuScreen extends MainScreen {
public CreateMenuScreen() {
addMenuItem(viewItem);
}

public MenuItem viewItem = new MenuItem("MyMenu", 100, 100) {

public void run() {

CreateMenuScreen myscreen = new CreateMenuScreen();
setTitle(" Message");
add(new RichTextField("create menu"));
UiApplication.getUiApplication().pushScreen(myscre en);
}

};
}


thanks
Offline   Reply With Quote