Humble origins

In: Personal

24 May 2003

Ah this is me finally getting into the blog scene! I’m an aspiring J2ME developer, and an even more aspiring J2EE developer. That aside, I’m your usual geek programmer type who spends more time in front of computers than I should, both in university, at home and at work. This will be a good place to put down my thoughts and discoveries in the world of Open Source, programming, web development, as well as more mundane stuff (like how life sucks, extreme lack of girls in my life, Liverpool FC, and music).

Name: Cheah Chu Yeow
Pseudonym: redemption
Occupation: Student at local university
Location: in front of a computer, Singapore
Skillset: Java, C, Python, PHP, Perl, SQL
Interests: J2EE, J2ME, XUL, UNIX, operating systems, distributed systems, Dragonlance, Football

In true geek fashion, I think this situation fairly deserves a ‘Hello, World’ code listing of some sort.

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class HelloWorld
extends MIDlet
implements CommandListener {
private Command exitCmd;
private TextBox tb;

public HelloWorld() {
exitCmd = new Command("Exit", Command.EXIT, 1);
tb = new TextBox( "Hello World", "Hello, World!", 15, 0 );
tb.addCommand(exitCmd);
tb.setCommandListener(this);
}

protected void startApp() {
Display.getDisplay(this).setCurrent(tb);
}

protected void pauseApp() { }
protected void destroyApp(boolean u) { }

public void commandAction(Command c, Displayable d) {
if ( c == exitCmd ) {
destroyApp(false);
notifyDestroyed();
}
}
}

Comments are closed.