Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Canvas



public class Test extends TestMidlet {

  protected void startApp() throws MIDletStateChangeException {
    Canvas c = new Canvas() {
     
      protected void paint(Graphics g) {
        g.setColor(0xFFFFFF);
        g.fillRect(0, 0, 300, 300);
       
View Full Code Here


     * @see javax.microedition.midlet.MIDlet#startApp()
     */
    protected void startApp() {
        try {
            final SVGImage image = loadSVGImage(SVG_URL);
            final Canvas canvas = new MySVGCanvas(image);

            // Display the canvas
            final Display display = Display.getDisplay(this);
            display.setCurrent(canvas);

            // Add close command
            _mainExit = new Command("Close", Command.EXIT, 1);
            canvas.addCommand(_mainExit);
            canvas.setCommandListener(this);
        } catch (final IOException ex) {
            System.exit(1);
        }
    }
View Full Code Here

TOP

Related Classes of javax.microedition.lcdui.Canvas

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.