Exception java.lang.IllegalArgumentException

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

Exception java.lang.IllegalArgumentException

Postby msmsmsms » Mon Aug 01, 2011 7:48 pm

when run below code exception java.lang.IllegalArgumentException occured help me please

public Display getDisplay () {
return Display.getDisplay(this);
}

/**
* Exits MIDlet.
*/
public void exitMIDlet() {
switchDisplayable (null, null);
destroyApp(true);
notifyDestroyed();
}

/**
* Called when MIDlet is started.
* Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
*/
public void startApp() {
try {
display = Display.getDisplay(this);
ExampleGameCanvas gameCanvas = new ExampleGameCanvas();
gameCanvas.start();
display.setCurrent(gameCanvas);
} catch (Exception ex) {
System.out.println(ex);
}
}


/**
* Called when MIDlet is paused.
*/
public void pauseApp() {

}

/**
* Called to signal the MIDlet to terminate.
* @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
*/
public void destroyApp(boolean unconditional) {
System.gc();
destroyApp(false);
notifyDestroyed(); }

}
msmsmsms
 
Posts: 1
Joined: Mon Aug 01, 2011 7:43 pm

Return to J2ME Games

Who is online

Users browsing this forum: No registered users and 5 guests

cron