📄 confirmexitscreen.java
字号:
package com.Series40Book;import javax.microedition.lcdui.*;/** * Confirm exit */public class ConfirmExitScreen extends Form implements CommandListener { private BTDiscovery viewer; private Command yes; private Command no; public ConfirmExitScreen (BTDiscovery v) { super ("Confirm"); viewer = v; yes = new Command ("Yes", Command.OK, 1); no = new Command ("No", Command.BACK, 1); append ("Really exit?"); addCommand (yes); addCommand (no); setCommandListener (this); } public void commandAction (Command c, Displayable d) { if ( c == yes ) { viewer.exitConfirmed = true; viewer.safeShutdown (); } else { viewer.exitConfirmed = false; viewer.resume(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -