File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Use of keyPressed to call a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Use of keyPressed to call a form" Watch "Use of keyPressed to call a form" New topic

Use of keyPressed to call a form

Paul Dudek

Joined: Jul 21, 2006
Posts: 8
Hi there,
It is easy enough to change the current Display using commandAction for the soft buttons as this method resides inside the main MIDlet class.
You would simply use something like:

Display d = Display.getDisplay(this);

public void commandAction(Command c, Displayable s) {
if (c == formCommand) {

I was wondering if anyone could tell me how to change display from a Canvas to a Form using keyPressed() which is a method of the Canvas class.
I would rather not have to draw a Form on the Canvas.

Many Thanks,

I agree. Here's the link:
subject: Use of keyPressed to call a form
It's not a secret anymore!