How to add menu items you can read in many tutorials for beginners.
Here a party, i can't post the link
Code:
class SiberianScreen extends MainScreen {
// When menu items are selected, their
// run method is invoked
private MenuItem _aboutMenu =
new MenuItem( "About", 10, 1 ){
public void run(){
onAbout();
}
};
// Constructs the screen.
SiberianScreen(){
setTitle( "Siberian Tiger" );
addMenuItem( _aboutMenu );
LabelField lf = new LabelField( "Roar!" );
add( lf );
}
// Invoked when the Close menu item (automatically
// added to the menu) is selected.
public boolean onClose(){
Dialog.alert( "Exiting!" );
System.exit( 0 );
return true;
}
// Invoked when the About menu item is selected.
private void onAbout(){
Dialog.inform( "This is the tiger application." );
}
}