Event-3
public void commandAction(
Command c, Displayable d) {
if(c==ok)
.
else if (c==cancel)
.
}