String Item


This code use to make StringItem in j2me
Kode dibawah ini digunakan untuk membuat StringItem di j2me

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;
import javax.microedition.midlet.MIDlet;
/**
* free to distribute but forbiden to delete this statement
* @author b1ms.wordpress.com
* ym : thats_myboy@yahoo.com
* “share code for free”
*/
public class CreatingStringItem extends MIDlet  {
private Display display;

private Form form;
private StringItem str1;
private StringItem str2;
public CreatingStringItem() {
display = Display.getDisplay(this);

form = new Form(“Display Form “);
str1 = new StringItem(“StringItem 1 “, “test stringitem 1”);
str2 = new StringItem(“StringItem 2: “, “test stringitem 2”);

form.append(str1);
form.append(str2);
}

public void startApp() {
display.setCurrent(form);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

}

download source

Running program

smoga bermanfaat
hope useful for u

Iklan
Ditulis dalam dasar, j2me. Tag: , . Leave a Comment »

tinggalkan pesan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: