I had that problem some months ago. Firstly, you must NOT implement the makeMenu method of your main screen like this:
Code:
protected void makeMenu(Menu menu, int instance) {
super.makeMenu(menu, 0);
}
.
I had that method like that, and the default close menu item could not be removed. Then I will give you the implementation of the makeMenu in some of my pages that my application shows (I use context menu, but the idea for the menu is the same I think):
Code:
protected void makeMenu(Menu menu, int instance) {
ContextMenu contextMenu = ContextMenu.getInstance();
contextMenu.clear();
contextMenuListener.makeContextMenu(contextMenu);
menu.deleteAll();
menu.add(contextMenu);
}
.
Implementing the makeContextMenu method (method of my own made ContextMenuListener) you can add your own menu items.
Code:
public void makeContextMenu(ContextMenu contextMenu) {
//...some other menu items
contextMenu.addItem(MenuItem.separator(32));
contextMenu.addItem(preferences);
contextMenu.addItem(MenuItem.separator(45));
contextMenu.addItem(close);
}
.
That is my way of doing it !