Source Code : Pacer

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Pacer

Pacer
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class Pacer extends MIDlet{ 
  public void startApp() { 
    Displayable d = new PacerCanvas();
    
    d.addCommand(new Command("Exit", Command.EXIT, 0));
    d.setCommandListener(new CommandListener() { 
      public void commandAction(Command c, Displayable s) { 
        notifyDestroyed();
      } 
    } );
    
    Display.getDisplay(this).setCurrent(d);
  } 
  
  public void pauseApp() { } 

  public void destroyApp(boolean unconditional) { } 
} 

class PacerCanvas extends Canvas { 
  public void paint(Graphics g) { 
    int w = getWidth();
    int h = getHeight();
    
    g.setColor(0xffffff);
    g.fillRect(0, 0, w, h);
    g.setColor(0x000000);

    for (int x = 0; x < w; x += 10)
      g.drawLine(0, w - x, x, 0);
    
    int z = 50;
    g.drawRect(z, z, 20, 20);
    z += 20;
    g.fillRoundRect(z, z, 20, 20, 5, 5);
    z += 20;
    g.drawArc(z, z, 20, 20, 0, 360);
  } 
} 

           
       

Thank with us