file: TesUI.java
package ui;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.UiApplication;
public class TesUI extends UiApplication {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
TesUI app = new TesUI();
app.enterEventDispatcher();
}
public TesUI()
{
/* this will display to BlackBerry Screen */
pushScreen(new BasicEditFieldScreen());
}
}
class BasicEditFieldScreen extends MainScreen {
public BasicEditFieldScreen(){
super();
setTitle(“Percobaan Textbox”);
VerticalFieldManager vfm = new
VerticalFieldManager(Manager.HORIZONTAL_SCROLL);
vfm.add(new BasicEditField(“Nama: “, “”));
vfm.add(new BasicEditField(“Alamat: “, “”));
add(vfm);
}
public boolean onClose()
{
Dialog.alert(“Sampai Jumpa!”);
System.exit(0);
return true;
}
}