📄 displayable1.java
字号:
//import javax.microedition.midlet.MIDlet;
//import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDletStateChangeException;
public class Displayable1 extends Canvas implements CommandListener {
playmusic p = new playmusic("/wozhuanqianle.midi");
private Command exitCommand;
public Displayable1() {
exitCommand=new Command("Exit", Command.EXIT, 1);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
// Set up this Displayable to listen to command events
setCommandListener(this);
// add the Exit command
addCommand(exitCommand);
}
public void commandAction(Command command, Displayable displayable) {
if (command == exitCommand) {
// stop the MIDlet
try {
MEvidio.quitApp();
} catch (MIDletStateChangeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public void paint(Graphics g) {
p.play(100,true);
}
/*public void setExitCommand(Command exitCommand) {
this.exitCommand = exitCommand;
}
public Command getExitCommand() {
return exitCommand;
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -