You need to leave some breadcrumbs to find your way back to your Midlet to find its display (and the form). Something along these lines:
public class myMIDlet extends MIDlet implements ... {
...
Form myForm = new Form( ...
...
myGameCanvas ggg = new myGameCanvas(... , this)
...
display.setCurrent(ggg);
...
}
class myGameCanvas extends GameCanvas implements ... {
myMIDlet myHost;
public myGameCanvas(... , myMIDlet host) {
super(...);
myHost = host;
...
}
... wherever you want to got to the form (probably in a commandAction or keyPressed)
Display disp = myHost.getDisplay();
disp.setCurrent(myHost.myForm);
}
Cheers,
Peter
If this answers your question, mark it as accepted. Vote anyway.