views:

172

answers:

1

The thing is I writing a J2ME program that fisrt of all show a "menu" using graphics interface (GameCanvas) and when the user select one item, I need to setCurrent that item (ex. a List), but when return from the List (it could be because the user push a Command "Menu" Item) I need to show the menu again.

The real problem when the menu show again, the keyPressed() listener of gamecanvas object stop working.

Basically I have:

A Midlet object with:

  • GameCanvas object instance
  • A List object instance

I don't understand how that works, I didn't find tutorial that share low and high graphics-level APIs on one Midlet.

A: 

could you please share a fully code that reproduce this problem, I can't think of any reason that could stop the listener from working again.

I don't recommend mixing low-level and high-level UI in the same application, it will break the consistency of your application UI.

Mahdi Hijazi