Algem tem um exemplo de HELLO WORLD?
para j2me claro!
ps: seria bom se no exemplo tambem ensinasse a compilar o bagulho
Algem tem um exemplo de HELLO WORLD?
para j2me claro!
ps: seria bom se no exemplo tambem ensinasse a compilar o bagulho
Aqui:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class OlaMundo extends MIDlet implements CommandListener {
Display tela;
TextBox texto;
Command sair;
public OlaMundo() {
// declaracao de textbox
this.texto = new TextBox("Mensagem","Ola, mundo!", 30, TextField.ANY);
// criar e configurar comando
this.sair = new Command("Sair", Command.EXIT, 0);
this.texto.addCommand(this.sair);
this.texto.setCommandListener(this);
// obtem referencia para a tela do dispositivo
this.tela = Display.getDisplay(this);
}
public void startApp() {
System.out.println("start");
this.tela.setCurrent(this.texto);
}
public void pauseApp() {
System.out.println("pause");
}
public void destroyApp(boolean incondicional) {
}
public void commandAction(Command c, Displayable d) {
this.destroyApp(true);
this.notifyDestroyed();
}
}
kemperacc,
Segue links:
http://developers.sun.com/techtopics/mobility/reference/codesamples/index.html
http://www.java2s.com/ExampleCode/J2ME/Networks.htm
ASOBrasil