IDE не распознает объекты Gauge, Alert, Ticker
IDE не видет обьекты Ticker, Gauge, Alert, пишет Cannot find symbol,
Привет к примеру коды с указанием где выдаётся ошибка!
Мб это с библиотекой что-то не так? но ведь когда я пишу import javax.microedition.lcdui. то мне выводятся все обьекты, Ticker, Gauge и тд и тп
Код:
import javax.microedition.lcdui.*;
public class Alert extends MIDlet implements CommandListener {
private Form myForm = new Form ("Тревога");
private Display myDisplay;
private Command exitMidlet;
private Alert al;
public Alert () {
myDisplay = Display.getDisplay(this);
}
public void startApp () {
try {
Image image = Image.createImage ("/error.png");
al = new Alert ("Тревога",null,image, AlertType.ERROR); //Cannot find symbol....
} catch (java.io.IOException ex) {}
myForm.addCommand(exitMidlet);
myForm.setCommandListener(this);
myDisplay.setCurrent(al);
}
public void pauseApp () {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if (c == exitMidlet) {
destroyApp(false);
notifyDestroyed();
}
}
}
Код:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Gauge extends MIDlet implements CommandListener {
private Form myForm = new Form ("Загрузка");
private Display myDisplay;
private Command exitMidlet;
private Gauge Polosa;
public Gauge () {
myDisplay = Display.getDisplay(this);
}
public void startApp () {
myForm = new Form(new Gauge("Прогресс:", true, 10,5)); //Cannot find symbol....
myForm.addCommand(exitMidlet);
myForm.setCommandListener(this);
myDisplay.setCurrent(myForm);
}
public void pauseApp () {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if (c == exitMidlet) {
destroyApp(false);
notifyDestroyed();
}
}
}
import javax.microedition.lcdui.*;
public class Gauge extends MIDlet implements CommandListener {
private Form myForm = new Form ("Загрузка");
private Display myDisplay;
private Command exitMidlet;
private Gauge Polosa;
public Gauge () {
myDisplay = Display.getDisplay(this);
}
public void startApp () {
myForm = new Form(new Gauge("Прогресс:", true, 10,5)); //Cannot find symbol....
myForm.addCommand(exitMidlet);
myForm.setCommandListener(this);
myDisplay.setCurrent(myForm);
}
public void pauseApp () {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if (c == exitMidlet) {
destroyApp(false);
notifyDestroyed();
}
}
}
Код:
import javax.microedition.lcdui.*;
public class Ticker extends MIDlet implements CommandListener {
private Form myForm;
private Display myDisplay;
private Command exitMidlet;
public Ticker () {
myDisplay = Display.getDisplay(this);
}
public void startApp () {
myForm = new Form ("Бег строка");
Ticker myTicker = new Ticker ("Бегущая строка"); //Cannot find symbol....
myForm.setTicker(myTicker);
myForm.addCommand(exitMidlet);
myForm.setCommandListener(this);
myDisplay.setCurrent(myForm);
}
public void pauseApp () {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d) {
if (c == exitMidlet) {
destroyApp(false);
notifyDestroyed();
}
}
}