/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package hello;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import org.netbeans.microedition.lcdui.SplashScreen;
/**
* @author Administrator
*/
public class HelloMIDlet extends MIDlet implements CommandListener {
private boolean midletPaused = false;
//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
private Command exitCommand;
private Form form;
private StringItem stringItem;
private SplashScreen splashScreen;
private Image image;
//</editor-fold>//GEN-END:|fields|0|
/**
* The HelloMIDlet constructor.
*/
public HelloMIDlet() {
}
//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
//</editor-fold>//GEN-END:|methods|0|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
/**
* Initilizes the application.
* It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
*/
private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
// write pre-initialize user code here
//GEN-LINE:|0-initialize|1|0-postInitialize
// write post-initialize user code here
}//GEN-BEGIN:|0-initialize|2|
//</editor-fold>//GEN-END:|0-initialize|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
/**
* Performs an action assigned to the Mobile Device - MIDlet Started point.
*/
public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
// write pre-action user code here
switchDisplayable(null, getSplashScreen());//GEN-LINE:|3-startMIDlet|1|3-postAction
// write post-action user code here
}//GEN-BEGIN:|3-startMIDlet|2|
//</editor-fold>//GEN-END:|3-startMIDlet|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
/**
* Performs an action assigned to the Mobile Device - MIDlet Resumed point.
*/
public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
// write pre-action user code here
//GEN-LINE:|4-resumeMIDlet|1|4-postAction
// write post-action user code here
}//GEN-BEGIN:|4-resumeMIDlet|2|
//</editor-fold>//GEN-END:|4-resumeMIDlet|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
/**
* Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
* @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
* @param nextDisplayable the Displayable to be set
*/
public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
// write pre-switch user code here
Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
if (alert == null) {
display.setCurrent(nextDisplayable);
} else {
display.setCurrent(alert, nextDisplayable);
}//GEN-END:|5-switchDisplayable|1|5-postSwitch
// write post-switch user code here
}//GEN-BEGIN:|5-switchDisplayable|2|
//</editor-fold>//GEN-END:|5-switchDisplayable|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
/**
* Called by a system to indicated that a command has been invoked on a particular displayable.
* @param command the Command that was invoked
* @param displayable the Displayable where the command was invoked
*/
public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
// write pre-action user code here
if (displayable == form) {//GEN-BEGIN:|7-commandAction|1|19-preAction
if (command == exitCommand) {//GEN-END:|7-commandAction|1|19-preAction
// write pre-action user code here
exitMIDlet();//GEN-LINE:|7-commandAction|2|19-postAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|3|24-preAction
} else if (displayable == splashScreen) {
if (command == SplashScreen.DISMISS_COMMAND) {//GEN-END:|7-commandAction|3|24-preAction
// write pre-action user code here
switchDisplayable(null, getForm());//GEN-LINE:|7-commandAction|4|24-postAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|5|7-postCommandAction
}//GEN-END:|7-commandAction|5|7-postCommandAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|6|
//</editor-fold>//GEN-END:|7-commandAction|6|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">//GEN-BEGIN:|18-getter|0|18-preInit
/**
* Returns an initiliazed instance of exitCommand component.
* @return the initialized component instance
*/
public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return exitCommand;
}
//</editor-fold>//GEN-END:|18-getter|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: form ">//GEN-BEGIN:|14-getter|0|14-preInit
/**
* Returns an initiliazed instance of form component.
* @return the initialized component instance
*/
public Form getForm() {
if (form == null) {//GEN-END:|14-getter|0|14-preInit
// write pre-init user code here
form = new Form("Welcome", new Item[] { getStringItem() });//GEN-BEGIN:|14-getter|1|14-postInit
form.addCommand(getExitCommand());
form.setCommandListener(this);//GEN-END:|14-getter|1|14-postInit
System.out.println("xdfhsdfhsdfhsdfhg!");
}//GEN-BEGIN:|14-getter|2|
return form;
}
//</editor-fold>//GEN-END:|14-getter|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">//GEN-BEGIN:|16-getter|0|16-preInit
/**
* Returns an initiliazed instance of stringItem component.
* @return the initialized component instance
*/
public StringItem getStringItem() {
if (stringItem == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
stringItem = new StringItem("Hello", "Hello, World!");//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return stringItem;
}
//</editor-fold>//GEN-END:|16-getter|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Getter: splashScreen ">//GEN-BEGIN:|22-getter|0|22-preInit
/**
* Returns an initiliazed instance of splashScreen component.
* @return the initialized component instance
*/
public SplashScreen getSplashScreen() {
if (splashScreen == null) {//GEN-END:|22-getter|0|22-preInit
// write pre-init user code here
splashScreen = new SplashScreen(getDisplay());//GEN-BEGIN:|22-getter|1|22-postInit
splashScreen.setTitle("\u7248\u6743");
splashScreen.setCommandListener(this);
splashScreen.setFullScreenMode
没有合适的资源?快使用搜索试试~ 我知道了~
初学netbeans6.8
共99个文件
class:81个
png:4个
xml:4个
4星 · 超过85%的资源 需积分: 10 18 下载量 44 浏览量
2009-12-16
14:33:43
上传
评论 2
收藏 203KB RAR 举报
温馨提示
初学netbeans6.8 做的一个关于界面的小程序 symbian s60 在诺基亚3250上测试成功
资源推荐
资源详情
资源评论
收起资源包目录
shiyan222.rar (99个子文件)
shiyan222
dist
shiyan222.jad 237B
shiyan222.jar 47KB
lib
src
calendar_64.png 7KB
hello
HelloMIDlet.vmd 7KB
HelloMIDlet.java 10KB
build
preprocessed
calendar_64.png 7KB
hello
HelloMIDlet.java 10KB
preverifysrc
org
netbeans
microedition
lcdui
TableModel.class 434B
TablePaintStrategy.class 363B
SimpleTableModel.class 5KB
AbstractInfoScreen.class 6KB
laf
UserColorSchema.class 2KB
DefaultColorSchema.class 2KB
SystemColorSchema.class 2KB
TableColorSchema.class 915B
ColorSchema.class 3KB
BaseColorSchemaStrategy.class 2KB
WaitScreen$BackgroundExecutor.class 2KB
WaitScreen$1.class 672B
TableItem.class 17KB
SplashScreen.class 3KB
LoginScreen.class 12KB
TableColorSchemaStrategy.class 2KB
TableModelListener.class 227B
WaitScreen$BackgroundExecutor$1.class 1KB
LoginScreen$1.class 1KB
WaitScreen.class 4KB
LoginScreen$InputTextBox.class 2KB
SplashScreen$1.class 238B
SplashScreen$Watchdog.class 1KB
util
CancellableTask.class 262B
SimpleCancellableTask.class 1KB
Executable.class 204B
hello
HelloMIDlet.class 5KB
manifest.mf 176B
preverified
calendar_64.png 7KB
org
netbeans
microedition
lcdui
TableModel.class 434B
TablePaintStrategy.class 363B
SimpleTableModel.class 5KB
AbstractInfoScreen.class 6KB
laf
UserColorSchema.class 2KB
DefaultColorSchema.class 2KB
SystemColorSchema.class 2KB
TableColorSchema.class 915B
ColorSchema.class 3KB
BaseColorSchemaStrategy.class 2KB
WaitScreen$BackgroundExecutor.class 2KB
WaitScreen$1.class 672B
TableItem.class 17KB
SplashScreen.class 3KB
LoginScreen.class 12KB
TableColorSchemaStrategy.class 2KB
TableModelListener.class 227B
WaitScreen$BackgroundExecutor$1.class 1KB
LoginScreen$1.class 1KB
WaitScreen.class 4KB
LoginScreen$InputTextBox.class 2KB
SplashScreen$1.class 238B
SplashScreen$Watchdog.class 1KB
util
CancellableTask.class 262B
SimpleCancellableTask.class 1KB
Executable.class 204B
hello
HelloMIDlet.class 5KB
compiled
calendar_64.png 7KB
org
netbeans
microedition
lcdui
TableModel.class 434B
TablePaintStrategy.class 363B
SimpleTableModel.class 5KB
AbstractInfoScreen.class 6KB
laf
UserColorSchema.class 2KB
DefaultColorSchema.class 2KB
SystemColorSchema.class 2KB
TableColorSchema.class 915B
ColorSchema.class 3KB
BaseColorSchemaStrategy.class 2KB
WaitScreen$BackgroundExecutor.class 2KB
WaitScreen$1.class 672B
TableItem.class 17KB
SplashScreen.class 3KB
LoginScreen.class 12KB
TableColorSchemaStrategy.class 2KB
TableModelListener.class 227B
WaitScreen$BackgroundExecutor$1.class 1KB
LoginScreen$1.class 1KB
WaitScreen.class 4KB
LoginScreen$InputTextBox.class 2KB
SplashScreen$1.class 238B
SplashScreen$Watchdog.class 1KB
util
CancellableTask.class 262B
SimpleCancellableTask.class 1KB
Executable.class 204B
hello
HelloMIDlet.class 5KB
.timestamp 9B
build.xml 4KB
nbproject
build-impl.xml 77KB
private
private.xml 386B
private.properties 190B
project.properties 27KB
project.xml 385B
genfiles.properties 455B
共 99 条
- 1
资源评论
- 「已注销」2013-11-28挺好用的开发工具,要是将一些有用的插件直接安装上就更加完美了
mcxh009
- 粉丝: 1
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功