witam mam taki problem
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class karol extends MIDlet implements CommandListener
{
protected void startApp()
throws MIDletStateChangeException
{
///////////
Alert alert = new Alert(
"Loading",
"Trwa ładowanie gry, proszę czekać...",
null,
AlertType.INFO);
alert.setIndicator(new Gauge(
null, // label
false, // interactive
9, // maxValue
0)); // initialValue
alert.setCommandListener(this);
alert.addCommand(new Command("pokaz1", Command.EXIT, 0));
alert.addCommand(new Command("Zakoncz", Command.BACK, 0));
Display display = Display.getDisplay(this);
display.setCurrent(alert);
//// kypreesd ....
}
protected void keyPressed(int keyCode){
if (keyCode == KEY_NUM1){
//Naciśnięto klawisz gwiazdki...
}
}
protected void pauseApp()
{
}
protected void destroyApp(boolean unconditional)
throws MIDletStateChangeException
{
}
//////
// Implementacja CommandListener
public void commandAction(Command c, Displayable d)
{
if (c.getCommandType() == Command.EXIT)
notifyDestroyed();
}
}
bład jest z keyCode co robię zle ??
C:\Documents and Settings\karol\j2mewtk\2.5.2\apps\karol\src\karol.java:31: cannot find symbol
symbol : variable KEY_NUM1
location: class karol
if (keyCode == KEY_NUM1){
^
1 error
com.sun.kvem.ktools.ExecutionException
help mi