MIDP: "Select one to launch" screen always on top?
From: Bo (snarlly_at_hotmail.com)
Date: 03/29/04
- Next message: Bo: "MIDP: create Image from int/byte array?"
- Previous message: David J Bush: "Re: Making an exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Mar 2004 19:08:52 -0800
Hi
The rectangles I draw in paint() always hide underneath the "Select
one to launch" screen, while the string "Hello World" is drawn over
the "to launch" screen. What am I doing wrong?
jdk 1.4, midp 2.0
public class myCanvas extends Canvas{
...
void paint(Graphics g)
{
g.setColor(0xFF0000);
g.fillRect(0,0, getWidth(), getHeight() );
g.setColor(0x00FF00);
g.drawString("Hello World", getWidth()/2, 0, Graphics.HCENTER |
Graphics.TOP);
}
}
public class MIDLET extends MIDlet implements Runnable{
myCanvas canvas;
...
startApp()
{
canvas = new myCanvas();
Display.getDisplay(this).setCurrent( canvas );
thread = new Thread( this );
thread.start();
}
...
void run()
{
while( true ) {
canvas.repaint();
}
Thread.sleep( 200 );
}
...
- Next message: Bo: "MIDP: create Image from int/byte array?"
- Previous message: David J Bush: "Re: Making an exe"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|