import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class ImageTutorial extends MIDlet
{
Display d;
Form f;
Image i;
public ImageTutorial()
{
d=Display.getDisplay(this);
//save any image in C:\Documents and Settings\admin\My Documents\NetBeansProjects\unit3\src
f=new Form("image application");
try
{
i=Image.createImage("/suhas8.jpg");
// i=Image.createImage("C:\\Documents and Settings\\admin\\My Documents\\NetBeansProjects\\unit3\\src\\suhas8.jpg");
f.append(i);
}
catch(Exception ex)
{
}
}
public void startApp() {
d.setCurrent(f);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
import javax.microedition.lcdui.*;
public class ImageTutorial extends MIDlet
{
Display d;
Form f;
Image i;
public ImageTutorial()
{
d=Display.getDisplay(this);
//save any image in C:\Documents and Settings\admin\My Documents\NetBeansProjects\unit3\src
f=new Form("image application");
try
{
i=Image.createImage("/suhas8.jpg");
// i=Image.createImage("C:\\Documents and Settings\\admin\\My Documents\\NetBeansProjects\\unit3\\src\\suhas8.jpg");
f.append(i);
}
catch(Exception ex)
{
}
}
public void startApp() {
d.setCurrent(f);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
No comments:
Post a Comment