import javax.microedition.lcdui.*; import javax.microedition.midlet.MIDlet; public class Canv extends Canvas { public SlideShow slideshow; /** * constructor */ public Canv(SlideShow slideshow) { this.slideshow=slideshow; setFullScreenMode(true); } /** * paint */ public void paint(Graphics g) { g.drawImage(slideshow.image, 0, 0, Graphics.LEFT | Graphics.TOP); } /** * Called when a key is pressed. */ protected void keyPressed(int key) { if(key==-7) slideshow.command(); if(key==54) slideshow.bar+=20; if(key==52) slideshow.bar-=20; } }