import javax.microedition.lcdui.*; public class ActivityMenu extends Canvas implements Runnable{ Font titleFont; public Boolean[] is; public menuItem[] item; public String[] list; public int width; public int height; public int red; public int green; public int blue; public int x; public int y; public Image back; public Image ss; public String title; public int titleFontHeight; public int titleFontWidth; public int backWidth; public int backHeight; public int backx; public int backy; public sensor backSensor; public ActivityMenu(String title, String[] list, int r, int g, int b){ super(); this.title = title; this.list = list; this.red = red; this.green = green; this.blue = blue; this.width = getWidth()-getWidth()/6; this.height = getHeight()/8; this.x = getWidth()/2-width/2; this.y = getHeight()/10*3; item = new menuItem[list.length]; try{ back = Image.createImage("/pic/back.png"); ss = Image.createImage("/pic/tbg.png"); } catch ( Exception e ){ } for(int i=0; i