📄 timezonetest.java
字号:
//TimeZoneTest.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
public class TimeZoneTest extends MIDlet implements CommandListener
{
private Display display;
private Form props;
private TimeZone zone;
private Command exitCommand = new Command("Exit", Command.EXIT, 1);
public TimeZoneTest()
{
display = Display.getDisplay(this);
}
public void startApp()
{
props = new Form("TimerZone");
props.append("Timer Zones:\n");
zone=TimeZone.getDefault();
String []zoneid=zone.getAvailableIDs();
for(int i=0;i<zoneid.length;i++)
{
props.append(zoneid[i]+"\n");
}
props.append("Current Time Zone:"+zone.getID()+"\n");
props.addCommand(exitCommand);
props.setCommandListener(this);
display.setCurrent(props);
}
public void commandAction(Command c, Displayable s)
{
if (c == exitCommand)
{
destroyApp(false);
notifyDestroyed();
}
}
public void destroyApp(boolean unconditional)
{
}
public void pauseApp()
{
display.setCurrent(null);
props = null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -