Передайте экземпляр формы MainMIDlet при вызове Aboutus.java.
Например,
MainMIDlet.java
public class MainMIDlet extends MIDlet implements ActionListener {
Form form = new form();
...
...
public void actionPerformed(ActionEvent ae)
{
Command cmd = ae.getCommand();
String cmdname= cmd.getCommandName();
if (cmdname.equals("Aboutus"))
{
Aboutus aboutus = new Aboutus(form); // pass the current form
aboutus.show();
}
}
}
Aboutus.java
public class Aboutus extends Form implements ActionListener {
Form mainform;
public Aboutus(Form form) {
this.mainform = form;
...
...
Command backCommand = new Command("Back",null,1);
this.setBackCommand(backCommand);
}
...
...
public void actionPerformed(ActionEvent ae)
{
Command cmd = ae.getCommand();
String cmdname= cmd.getCommandName();
if (cmdname.equals("Back"))
{
mainform.showBack(); // show the Main Midlet form here
}
}
}