A J2ME tip explaining a method of implementing one command for more than one application screen without creating an instance for each screen. For example, some commands, such as EXIT, might need to appear on more than one application screen. When this is the case, it is not necessary to create a dedicated instance for each screen, because a single Command can be added to any number of screens:


Command exitCommand = new Command("Exit", Command.EXIT, 0);
form1.addCommand(exitCommand);
form2.addCommand(exitCommand);