0

I have a form which has 4 commands says Action1, Action2, Action3, Action4. Theses commands runs fine.

Now i have a button says runCommand which have to call Action1 command. how can we do it. that run a command on action of particular button's action listener .

Cœur
  • 37,241
  • 25
  • 195
  • 267
vikrant kumar
  • 208
  • 2
  • 14

2 Answers2

2

While invoking actionPerformed will work, there is a better and more correct way:

Display.getInstance().getCurrent().dispatchCommand(cancel, new ActionEvent(form, BACK_COMMAND_ID));
Shai Almog
  • 51,749
  • 5
  • 35
  • 65
0

Issue resolved.

We can use following code to run command in code.




    cancle.actionPerformed(new ActionEvent(form, BACK_COMMAND_ID));


vikrant kumar
  • 208
  • 2
  • 14