📄 hello2.java
字号:
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
/**
* Another basic MIDlet used primarily to demonstrate how multiple MIDlets make
* up a MIDlet Suite. This class extends the existing Hello class and overides
* the constructor so it displays different content in the Form.
*
* @author Martin J. Wells
*/
public class Hello2 extends Hello
{
/**
* Constructor for the MIDlet which instantiates the Form object and
* then adds a text message. It then sets up a command listener so it
* will get called back when the user hits the quit command. Note that this
* Form is not activated (displayed) until the startApp method is called.
*/
public Hello2()
{
// create a form and add our text
form = new Form("My 2nd Midlet");
form.append("Hello, to another Micro World!");
// create a way to quit
form.setCommandListener(this);
quit = new Command("Quit", Command.SCREEN, 1);
form.addCommand(quit);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -