textform.java
来自「J2me游戏代码 J2me游戏代码 J2me游戏代码 J2me游戏代码」· Java 代码 · 共 34 行
JAVA
34 行
/**
* A simple form to display a bunch of text and then return to the calling
* screen.
*/
import javax.microedition.lcdui.*;
public class TextForm extends Form implements CommandListener
{
private Command back;
private Screen home;
public TextForm(Screen homeArg, String displayText)
{
// call the Form constructor
super("");
home = homeArg;
append(displayText);
// add the exit
back = new Command("Back", Command.BACK, 1);
addCommand(back);
setCommandListener(this);
}
public void commandAction(Command command, Displayable displayable)
{
if (command == back)
StarAssault.activateDisplayable(home);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?