1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
public class Bouton extends Canvas{
int AxeX;
int AxeY;
Bouton(){
}
protected void paint(Graphics arg0) {
// TODO Auto-generated method stub
arg0.setColor(150,150,150);
arg0.fillRoundRect(0,0,250,300,0,0);
arg0.setColor(0,100,200);
arg0.fillRoundRect(10,10,220,25,10,10);
arg0.setColor(255,255,255);
arg0.drawString("Pain au lait",15,15,0);
arg0.setColor(0,100,200);
arg0.fillRoundRect(10,40,220,25,10,10);
arg0.setColor(255,255,255);
arg0.drawString("Jus d'orange",15,45,0);
arg0.setColor(0,100,200);
arg0.fillRoundRect(10,70,220,25,10,10);
arg0.setColor(255,255,255);
arg0.drawString("Brique de lait",15,75,0);
}
} |
Partager