Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 18:10, 3 September 2007.

Image item

From Forum Nokia Wiki

The following code creates a Form with an Image Item.

import java.io.IOException;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
 
public class Image_Item extends MIDlet 
{
    Display display=Display.getDisplay(this);
    public void startApp() 
    {
        Form form = new Form("Form example");
        try 
        {
            Image Logo = Image.createImage("/images/logo.png");
            //ImageItem(label,Image,layout,alternative text)
            ImageItem imageitem =new ImageItem("ImageItem Example",Logo,
                                                ImageItem.LAYOUT_CENTER,"");
            form.append(imageitem);
        } 
        catch (IOException ex) 
        {
            System.out.println("Exception occurred: "+ex);
        }
       display.setCurrent(form);
    }
}

The following screen shot is an outcome.

Image:imageitem.png

 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZjavaQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX