📄 hello.java
字号:
/*
* Created on 2005-2-28
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package test;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/**
* @author seesum
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Hello extends MIDlet
{
private Display display;
public Hello() {
display = Display.getDisplay(this);
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException
{
TextBox t = new TextBox("Hello MIDlet", "Hello MIDP!", 256, 0);
String s="this is james mobilephone\r\n";
s+="this is james mobilephone\r\n";
s+="this is james mobilephone\r\n";
TextBox t1 = new TextBox("Hello MIDlet", s, 256, 0);
display.setCurrent(t);
display.setCurrent(t1);
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp()
{
String s="this is vpause mobilephonpausee\r\n";
s+="this is pause mobilephone\r\n";
s+="this is pause mobilephone\r\n";
TextBox t1 = new TextBox("Hello MIDlet", s, 256, 0);
display.setCurrent(t1);
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
// TODO Auto-generated method stub
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -