Here is simple example of static image to be displayed as logo on the start-up/splash screen.
This can be improved by creating animation out of series of images or use of flash file through Project Capuchin library.
As for location of image file this was placed in new folder called "res" as resources. The folder is on same level as "myProject" folder that holds Java classes. If you decide to have "res" folder placed inside "myProject" folder then image path will be /myProject/res/IMAGE_NAME
ProjectMIDlet.java
package myProject;
/**
* Created by IntelliJ IDEA.
* User: Peter
* URL: [url]http://www.peterscorner.co.uk[/url]
* Date: 02-Oct-2009
* Time: 17:40:55
*/
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display;
import myProject.screens.SplashScreen;
public class ProjectMIDlet extends MIDlet{
public String ti;
public String entrydate;
public String result;
private Display display;
public ProjectMIDlet() {}
public void startApp() {
if(display == null){
display = Display.getDisplay(this);
}
display.setCurrent(new SplashScreen(this));
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
}
NextScreen.java
package myProject.screens;
/**
* Created by IntelliJ IDEA.
* User: Peter
* URL: [url]http://www.peterscorner.co.uk[/url]
* Date: 02-Oct-2009
* Time: 17:56:08
*/
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;
import myProject.ProjectMIDlet;
public class NextScreen extends Form implements CommandListener{
private ProjectMIDlet projectMidlet;
public NextScreen(ProjectMIDlet projectMidlet){
super("Next Screen");
this.projectMidlet = projectMidlet;
init();
}
private void init(){
StringItem si = new StringItem(null, "Next Screen");
append(si);
}
public void commandAction(Command c, Displayable d){}
}