[HELP]Bantu benerin code ini dong gan, (Java J2ME)
Selasa, 03 Januari 2012 by ewepaksa
Selamat membaca . Software Akuntansi Laporan Keuangan Terbaik Ane kan lagi belajar nih gan nyoba otak atik maker cipher dari internet codenya kan gini Spoiler for aaaaa: Quote: /* * To modify this template, opt Tools | Templates * and unstoppered the model in the editor. */ import javax.microedition.midlet.*; import javax.microedition.lcdui.*; /** * @author Sapto Sutardi Fakultas Kedokteran Univ. Mataram */ public collection KamusEngIndo extends MIDlet implements CommandListener { open Form frEng, frIndo; open Display display; open Command cmTransEng, cmTransIndo, cmExit, cmBackEng, cmBackIndo, cmKeUtama; open TextField tfEng, tfIndo; open TextBox tbEng, tbIndo; open List lsUtama; open Alert alNotFound; open String[] indo = {"telepon genggam", "komputer", "kipas angin", "komputer jinjing", "sepatu", "surat kabar", "majalah"}; open String[] Eng = {"handphone", "computer", "fan", "notebook", "shoes", "newspaper", "magazine"}; open KamusEngIndo(){ pass = Display.getDisplay(this); alNotFound = newborn Alert("Maaf", "Kata yang Anda cari tidak tersedia.", null, AlertType.INFO); alNotFound.setTimeout(3000); } open vacuum startApp() { get_lsUtama(); } open vacuum pauseApp() { } open vacuum destroyApp(boolean unconditional) { } open vacuum exitMIDlet() { display.setCurrent(null); destroyApp(false); notifyDestroyed(); } open vacuum commandAction(Command c, Displayable d) { if(c == cmTransEng){ String sEng = tfEng.getString().toLowerCase(); for(int i =0; i<Eng.length; i++){ if(sEng.equals(Eng[i])){ System.out.println("Posisi :"+i); get_vEng(); tbEng.setString(indo[i]); break; } added { display.setCurrent(alNotFound); } } } if(c == cmTransIndo){ String sEng = tfIndo.getString().toLowerCase(); for(int i =0; i<indo.length; i++){ if(sEng.equals(indo[i])){ System.out.println("Posisi :"+i); get_vIndo(); tbIndo.setString(Eng[i]); break; } added { display.setCurrent(alNotFound); } } } added if(c == cmExit){ destroyApp(false); notifyDestroyed(); } added if (c == List.SELECT_COMMAND) { if (d == lsUtama){ alter (lsUtama.getSelectedIndex()) { housing 0: { get_Eng(); break; } housing 1: { get_Indo(); break; } } } } added if(c == cmBackEng){ display.setCurrent(frEng); } added if(c == cmBackIndo){ display.setCurrent(frIndo); } added if(c == cmKeUtama){ get_Eng(); display.setCurrent(lsUtama); } } open List get_lsUtama(){ lsUtama = newborn List("Kamus Eng Indo", List.IMPLICIT); lsUtama.append("Eng -> Indo", null); lsUtama.append("Indo -> Eng", null); lsUtama.append("Exit", cmExit); cmExit = newborn Command("Keluar", Command.EXIT, 1); lsUtama.addCommand(cmExit); lsUtama.setCommandListener(this); display.setCurrent(lsUtama); convey lsUtama; } open Form get_Eng(){ frEng = newborn Form("Eng -> Indo"); tfEng = newborn TextField("Kata Eng", null, 20, TextField.ANY); cmTransEng = newborn Command("Terjemah", Command.SCREEN, 1); cmKeUtama = newborn Command("Kembali", Command.SCREEN, 2); frEng.append(tfEng); frEng.addCommand(cmTransEng); frEng.addCommand(cmKeUtama); frEng.setCommandListener(this); display.setCurrent(frEng); convey frEng; } open Form get_Indo(){ frIndo = newborn Form("Indo -> Eng"); tfIndo = newborn TextField("Kata Indo", null, 20, TextField.ANY); cmTransIndo = newborn Command("Terjemah", Command.SCREEN, 1); cmKeUtama = newborn Command("Kembali", Command.SCREEN, 2); frIndo.append(tfIndo); frIndo.addCommand(cmTransIndo); frIndo.addCommand(cmKeUtama); frIndo.setCommandListener(this); display.setCurrent(frIndo); convey frIndo; } open TextBox get_vEng(){ tbEng = newborn TextBox(tfEng.getString(), "", 100, 1); cmBackEng = newborn Command("Kembali", Command.SCREEN, 1); tbEng.addCommand(cmBackEng); tbEng.setCommandListener(this); display.setCurrent(tbEng); convey tbEng; } open TextBox get_vIndo(){ tbIndo= newborn TextBox(tfIndo.getString(), "", 100, 1); cmBackIndo = newborn Command("Kembali", Command.SCREEN, 1); tbIndo.addCommand(cmBackIndo); tbIndo.setCommandListener(this); display.setCurrent(tbIndo); convey tbIndo; } } nah kan hasilnya ada gini Spoiler for Pic: nah cardinal kan masih caretaker nubie itu biar Tulisan "Exit" bukan Keluar nya pas dipilih keluar gimana ya gan? maksudnya ngasih perintah keluar dari aplikasi gitu gan.. nah sama ini gan Spoiler for Pic: biar see langsung aja gitu ga usah buka schedule bisa gak gan?? atau agan2 ada yang punya referensi cardinal harus membaca apa nih??? makasih gan hehehe :DSoftware Akuntansi Laporan Keuangan Terbaik
Jual Beli Kaskus
Jual Beli Kaskus
Posting Komentar