Splash.java
/*
* Copyright © 2011 Nokia Corporation. All rights reserved.
* Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
* Oracle and Java are trademarks or registered trademarks of Oracle and/or its
* affiliates. Other product and company names mentioned herein may be trademarks
* or trade names of their respective owners.
* See LICENSE.TXT for license information.
*/
package com.nokia.example.racer.views;
import com.nokia.example.racer.helpers.ImageLoader;
import java.io.IOException;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
public class Splash extends Canvas{
private Image splash;
public Splash() {
try {
splash = ImageLoader.getInstance().loadImage("/splash_screen.png");
}catch(IOException io) {
}
setFullScreenMode(true);
}
public void paint(Graphics g) {
g.drawImage(splash, 0, 0, g.TOP|g.LEFT);
}
}