Topic Text   Topic Comments (0)   Topic Properties   Topic Information demo@dem...
Topic title: test topic Wednesday September 15, 2010 06:33:36

Download topic text | View in variable-width font | Tab width set to 8 (change to 4)

Files in topic: (view all files)  
Document.txt   {+34,-0}

[Add General Comment] to topic.

File Document.txt (Revision 1.0) [Add File Comment] [Top]
 
1 package com.aniruddha.j2me.hello;
2
3 import javax.microedition.midlet.MIDlet;
4 import javax.microedition.midlet.MIDletStateChangeException;
5
6 import javax.microedition.midlet.*;
7 import javax.microedition.lcdui.*;
8
9 public class HelloWorld extends MIDlet implements CommandListener {
10 private Command exitCommand;
11 private TextBox tbox;
12
13 public HelloWorld() {
14 exitCommand = new Command("Exit", Command.EXIT, 1);
15 tbox = new TextBox("Hello world MIDlet", "Hello World!", 25, 0);
16 tbox.addCommand(exitCommand);
17 tbox.setCommandListener(this);
18 }
19
20 protected void startApp() {
21 Display.getDisplay(this).setCurrent(tbox);
22 }
23
24 protected void pauseApp() {}
25 protected void destroyApp(boolean bool) {}
26
27 public void commandAction(Command cmd, Displayable disp) {
28 if (cmd == exitCommand) {
29 destroyApp(false);
30 notifyDestroyed();
31 }
32 }
33 }
 
File Document.txt (Revision 1.0) [Add File Comment] [Top]
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.