SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
Nama : wardatul Husnia
Nim : 1100631042
JAVAME
Java ME merupakan sebuah pengembangan aplikasi Java untuk lingkungan yang lebih
kecil dibandingkan dengan PC. “Lebih kecil” disini adalah PDA, Hanphone, Pager dan lain lain.
Dan tentu saja teknologi Java ME ini lebih simple dan lebih terbatas penggunaannya
dibandingkan dengan Java yang terdapat pada PC. Java ME ini sendiri sebetulnya untuk masalah
fitur tergantung dari “merk ponsel” yang digunakan, “kemampuan ponsel” dan “dukungan “
terhadap teknologi Java ME. Misalnya bila phonsel anda memiliki sebuah kamera, maka Java
ME fungsi capture gambar kamera akan dapat berjalan dengan baik bila dibandingkan dengan
ponsel yang biasa.
Telah kita ketahui bersama bahwa Java telah diakuisisi oleh Oracle dari Sun Microsystems,
sehingga untuk anda yang ingin membaca lebih mengenai Java terutama versi Micro ini anda
dapat langsung ke website official di
http://www.oracle.com/us/technologies/java/mobile/index.html atau anda juga dapat membaca
lengkap pada Wikipedia http://en.wikipedia.org/wiki/Java_Platform,_Micro_Edition
Setelah mengetahui pengertian Java ME, lalu apa yang harus dilakukan kemudian bila ingin
menjadi seorang developer Java ME? Yup, anda bisa memulai dengan mengenal Editor untuk
Java ME dan Api codenya. Editor untuk Java, termasuk Java ME dikenal dengan nama Java ME
SDK (Software Development Kit). Sedangkan untuk Api, anda bisa memulai mempelajari Java
ME Api References. Semua yang saya sebutkan ini ada dalam situs official java
http://www.oracle.com/technetwork/java/javame/javamobile/overview/getstarted/index.html ,
kedepannya nanti anda akan mengenal hal hal penting yang berhubungan dengan Java ME
development seperti LWUIT, JSR, CLDC, MIDP, dan lain-lain.
A.Mari kita lanjut dengan pengenalan Software Development Kit ( SDK),,
SDK dapat anda download pada link
http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html , dengan
SDK inilah kita nantinya akan memulai mengetikkan kode perbaris untuk membuat sebuah
aplikasi Java untuk mobile. Apa sih yang ada dalam SDK? Banyak, diantaranya adalah Netbeans
Integration, Device Manager, Support LWUIT, Network Monitor, CPU Profiler, WURLF
Device Database, dan masih banyak lagi.
Coba perhatikan notes dalam situs oracle tersebut, bila anda menggunakan NetBeans 7.1.1, maka
anda tidak perlu mendownload Java ME SDK ini karena telah terintegrasi dengan Netbeans versi
terbaru (http://www.netbeans.org)
B.Pengenalan LWUIT sebagai UI Library.
Seperti yang telah saya sampaikan di awal, nantinya, dalam kaitannya dengan pengembangan
Java ME, anda akan mengenal banyak hal secara bertahap, salah satunya adalah yang akan kita
bahas ini , Light Weight User Interface Toolkit (LWUIT). Pasti untuk anda yang sudah familiar
dengan Java SE (Java Untuk PC) telah mengenal GUI yang berupa SWING, nah, begitu juga
dengan LWUIT , User Interface Library ini menawarkan advanced UI dan Clean Api yang
terinspirasi dari Swing. Coba perhatikan gambar berikut ini:
Dengan menggunakan LWUIT ini maka developer Java ME tidak perlu menuliskan kode khusus
untuk setiap device tapi hanya dengan menambahkan UI component maka look and feel LWUIT
akan menyesuaikan sendiri.
LWUIT itu sendiri disupport oleh MIDP 2.0/CLDC 1.1 dan CDC. Silahkan gabung di LWUIT
website http://lwuit.java.net/
Fitur – fitur dalam LWUIT diantaranya:
•UI Controls - Components such as Tree, Table, Buttons, List, etc. inspired by Swing
•XHTML and HTML4 support - LWUIT's HTML component allows rendering of HTML
documents that conform to the XHTML Mobile Profile 1.0 standard and HTML4
•Layouts Manager - A very flexible and powerful feature, particularly if the application runs on
different screen sizes
•Pluggable Look and Feel & Themes - The toolkit lets you create a CSS-like file that can be
loaded or changed at runtime, controllling the look and feel of the application
•Fonts - The library features bitmap fonts and a tool that lets you create fonts on your desktop
•Touch Screen - All LWUIT components support touch events. No special coding is needed for a
LWUIT application to run on a touch-enabled device
•Virtual keyboard support - This functionality enhances the touch screen support through
LWUIT by enabling customizable user input through the virtual keyboard on the device display
•Animations & Transitions - Various visual effects available out-of-the-box through the library
add life to applications
•3D and SVG Graphics Integration - Optional features for advanced devices.
•Tools - LWUIT provides a Theme Creator tool for editing and creating themes and resources.
This is a standalone application for creating and viewing background painting, objects, and other
theme elements
•Bi-directional text support - Support for right to left text
•Drag and Drop
•GUI builder
•IO Framework
•HTML4 Tag Support
•XML Parsing API
•Enhanced Blackberry support
•Audio playback API
C.Pengenalan CLDC (Connected Limeted Device Configuration)
CLDC atau Connected Limited Device Cofiguration adalah perangkat dasar dari Java ME,
spesifikasi dasar yang berupa library atau API yang diimplementasikan pada Java ME, seperti
yang digunakan pada telepon selular, pager, dan PDA. Perangkat tersebut dibatasi dengan
keterbatasan memory, sumber daya, dan kemampuan memproses. Spesifikasi CLDC pada Java
ME adalah spesifikasi minimal pada package, class, dan sebagian fungsi Java Virtual Machine
yang dikurangi agar dapat diimplementasikan dengan keterbatasan sumber daya pada alat
tersebut, JVM yang digunakan adalah KVM (Kilobyte Virtual Machine).
D.Pengenalan Mobile Information Device Profile (MIDP)
MIDP atau Mobile Information Device Profile adalah spesifikasi untuk sebuah profil J2ME.
MIDP memilik lapisan diatas CLDC, API tambahan untuk daur hidup aplikasi, antar muka,
jaringan, dan pemyimpanan persisten. Pada saat ini terdapat MIDP 1.0 dan MIDP 2.0. Fitur
tambahan pada MIDP 2.0 dibandingkan MIDP 1.0 adalah API untuk multimedia. Pada MIDP 2.0
terdapat dukungan memainkan tone, tone sequence, dan file WAV walaupun tanpa adanya
Mobile Media API (MMAPI).
Nah, yang berikutnya, pasti anda juga penasaran dengan Java terlebih bila dibandingkan dengan
Java Android, Android sebetulnya merupakan System Operasi linux pada SmartPHone. Untuk
membuat aplikasi mobile khusus android anda pun juga bisa menggunakan Java, cuman ada
perbedaan penggunaan Java untuk HandPHone biasa dengan penggunaan Java dalam
SmartPhone Android, berikut merupakan daftar dari http://www.candra.web.id/
** PERBEDAAN DENGAN ANDROID
No Faktor java ME Android
1
Bahasa
Pemrograman Java java,C++,Mono,XML,Scripting
2 Device Featured Phone Smartphone,Tablet
3 Format File installer jar apk
4 Official IDE NetBeans Eclipse
5 Fitur /API Miskin fitur Kaya Fitur
6 Virtual Mesin
KVM (Kilobyte virtual
Machine) DalvikVM
7 Hasil Kompilasi class dex
8 Input touch,keyboard
keyboard,touch,pen,sensor,USB
host
9 Official Market N/A Android market
10 Security Aman Tidak aman
Demikian tutorial singkat mengenai pengenalan dengan Java ME sebagai Mobile App, semoga
bermanfaat dan pada tutorial berikutnya kita akan praktek membuat Java ME application. (^^,)
CONTOH PROGRAM J2ME
/*
*@ author Resa C.R
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Kalender extends MIDlet implements
CommandListener,ItemStateListener
{
private Display tampil;
private Form form;
private Command cmdExit;
private DateField df;
public Kalender()
{
tampil = Display.getDisplay(this);
df = new DateField("Tanggal Sekarang : ",DateField.DATE);
df.setDate(new java.util.Date());
cmdExit = new Command("Keluar",Command.EXIT,0); //Menambahkan
aksi keluar
form = new Form("Kalender J2ME"); //Title Form
form.addCommand(cmdExit);
form.append(df);
form.setCommandListener(this);
form.setItemStateListener(this);
}
public void startApp()
{
tampil.setCurrent(form);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command com,Displayable dis)
{
if(com == cmdExit)
{
destroyApp(true);
notifyDestroyed();
}
}
public void itemStateChanged(Item itm)
{
df.setLabel("Tanggal Baru: ");
}
}
Referensi :
1. http://www.mediatutorial.web.id/2012/06/java-me-no1-pengertian-javame-j2me-apa.html
2. http://marisharingilmu.wordpress.com/tag/contoh-program-j2me/

Más contenido relacionado

Destacado

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Warda 1100631042

  • 1. Nama : wardatul Husnia Nim : 1100631042 JAVAME Java ME merupakan sebuah pengembangan aplikasi Java untuk lingkungan yang lebih kecil dibandingkan dengan PC. “Lebih kecil” disini adalah PDA, Hanphone, Pager dan lain lain. Dan tentu saja teknologi Java ME ini lebih simple dan lebih terbatas penggunaannya dibandingkan dengan Java yang terdapat pada PC. Java ME ini sendiri sebetulnya untuk masalah fitur tergantung dari “merk ponsel” yang digunakan, “kemampuan ponsel” dan “dukungan “ terhadap teknologi Java ME. Misalnya bila phonsel anda memiliki sebuah kamera, maka Java ME fungsi capture gambar kamera akan dapat berjalan dengan baik bila dibandingkan dengan ponsel yang biasa. Telah kita ketahui bersama bahwa Java telah diakuisisi oleh Oracle dari Sun Microsystems, sehingga untuk anda yang ingin membaca lebih mengenai Java terutama versi Micro ini anda dapat langsung ke website official di http://www.oracle.com/us/technologies/java/mobile/index.html atau anda juga dapat membaca lengkap pada Wikipedia http://en.wikipedia.org/wiki/Java_Platform,_Micro_Edition Setelah mengetahui pengertian Java ME, lalu apa yang harus dilakukan kemudian bila ingin menjadi seorang developer Java ME? Yup, anda bisa memulai dengan mengenal Editor untuk Java ME dan Api codenya. Editor untuk Java, termasuk Java ME dikenal dengan nama Java ME SDK (Software Development Kit). Sedangkan untuk Api, anda bisa memulai mempelajari Java ME Api References. Semua yang saya sebutkan ini ada dalam situs official java http://www.oracle.com/technetwork/java/javame/javamobile/overview/getstarted/index.html , kedepannya nanti anda akan mengenal hal hal penting yang berhubungan dengan Java ME development seperti LWUIT, JSR, CLDC, MIDP, dan lain-lain. A.Mari kita lanjut dengan pengenalan Software Development Kit ( SDK),, SDK dapat anda download pada link http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html , dengan SDK inilah kita nantinya akan memulai mengetikkan kode perbaris untuk membuat sebuah aplikasi Java untuk mobile. Apa sih yang ada dalam SDK? Banyak, diantaranya adalah Netbeans Integration, Device Manager, Support LWUIT, Network Monitor, CPU Profiler, WURLF Device Database, dan masih banyak lagi. Coba perhatikan notes dalam situs oracle tersebut, bila anda menggunakan NetBeans 7.1.1, maka anda tidak perlu mendownload Java ME SDK ini karena telah terintegrasi dengan Netbeans versi terbaru (http://www.netbeans.org) B.Pengenalan LWUIT sebagai UI Library. Seperti yang telah saya sampaikan di awal, nantinya, dalam kaitannya dengan pengembangan
  • 2. Java ME, anda akan mengenal banyak hal secara bertahap, salah satunya adalah yang akan kita bahas ini , Light Weight User Interface Toolkit (LWUIT). Pasti untuk anda yang sudah familiar dengan Java SE (Java Untuk PC) telah mengenal GUI yang berupa SWING, nah, begitu juga dengan LWUIT , User Interface Library ini menawarkan advanced UI dan Clean Api yang terinspirasi dari Swing. Coba perhatikan gambar berikut ini: Dengan menggunakan LWUIT ini maka developer Java ME tidak perlu menuliskan kode khusus untuk setiap device tapi hanya dengan menambahkan UI component maka look and feel LWUIT akan menyesuaikan sendiri. LWUIT itu sendiri disupport oleh MIDP 2.0/CLDC 1.1 dan CDC. Silahkan gabung di LWUIT website http://lwuit.java.net/ Fitur – fitur dalam LWUIT diantaranya: •UI Controls - Components such as Tree, Table, Buttons, List, etc. inspired by Swing •XHTML and HTML4 support - LWUIT's HTML component allows rendering of HTML documents that conform to the XHTML Mobile Profile 1.0 standard and HTML4 •Layouts Manager - A very flexible and powerful feature, particularly if the application runs on different screen sizes •Pluggable Look and Feel & Themes - The toolkit lets you create a CSS-like file that can be loaded or changed at runtime, controllling the look and feel of the application •Fonts - The library features bitmap fonts and a tool that lets you create fonts on your desktop •Touch Screen - All LWUIT components support touch events. No special coding is needed for a LWUIT application to run on a touch-enabled device •Virtual keyboard support - This functionality enhances the touch screen support through LWUIT by enabling customizable user input through the virtual keyboard on the device display •Animations & Transitions - Various visual effects available out-of-the-box through the library add life to applications
  • 3. •3D and SVG Graphics Integration - Optional features for advanced devices. •Tools - LWUIT provides a Theme Creator tool for editing and creating themes and resources. This is a standalone application for creating and viewing background painting, objects, and other theme elements •Bi-directional text support - Support for right to left text •Drag and Drop •GUI builder •IO Framework •HTML4 Tag Support •XML Parsing API •Enhanced Blackberry support •Audio playback API C.Pengenalan CLDC (Connected Limeted Device Configuration) CLDC atau Connected Limited Device Cofiguration adalah perangkat dasar dari Java ME, spesifikasi dasar yang berupa library atau API yang diimplementasikan pada Java ME, seperti yang digunakan pada telepon selular, pager, dan PDA. Perangkat tersebut dibatasi dengan keterbatasan memory, sumber daya, dan kemampuan memproses. Spesifikasi CLDC pada Java
  • 4. ME adalah spesifikasi minimal pada package, class, dan sebagian fungsi Java Virtual Machine yang dikurangi agar dapat diimplementasikan dengan keterbatasan sumber daya pada alat tersebut, JVM yang digunakan adalah KVM (Kilobyte Virtual Machine). D.Pengenalan Mobile Information Device Profile (MIDP) MIDP atau Mobile Information Device Profile adalah spesifikasi untuk sebuah profil J2ME. MIDP memilik lapisan diatas CLDC, API tambahan untuk daur hidup aplikasi, antar muka, jaringan, dan pemyimpanan persisten. Pada saat ini terdapat MIDP 1.0 dan MIDP 2.0. Fitur tambahan pada MIDP 2.0 dibandingkan MIDP 1.0 adalah API untuk multimedia. Pada MIDP 2.0 terdapat dukungan memainkan tone, tone sequence, dan file WAV walaupun tanpa adanya Mobile Media API (MMAPI). Nah, yang berikutnya, pasti anda juga penasaran dengan Java terlebih bila dibandingkan dengan Java Android, Android sebetulnya merupakan System Operasi linux pada SmartPHone. Untuk membuat aplikasi mobile khusus android anda pun juga bisa menggunakan Java, cuman ada perbedaan penggunaan Java untuk HandPHone biasa dengan penggunaan Java dalam SmartPhone Android, berikut merupakan daftar dari http://www.candra.web.id/ ** PERBEDAAN DENGAN ANDROID No Faktor java ME Android 1 Bahasa Pemrograman Java java,C++,Mono,XML,Scripting 2 Device Featured Phone Smartphone,Tablet 3 Format File installer jar apk 4 Official IDE NetBeans Eclipse 5 Fitur /API Miskin fitur Kaya Fitur 6 Virtual Mesin KVM (Kilobyte virtual Machine) DalvikVM 7 Hasil Kompilasi class dex
  • 5. 8 Input touch,keyboard keyboard,touch,pen,sensor,USB host 9 Official Market N/A Android market 10 Security Aman Tidak aman Demikian tutorial singkat mengenai pengenalan dengan Java ME sebagai Mobile App, semoga bermanfaat dan pada tutorial berikutnya kita akan praktek membuat Java ME application. (^^,) CONTOH PROGRAM J2ME /* *@ author Resa C.R */ import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Kalender extends MIDlet implements CommandListener,ItemStateListener { private Display tampil; private Form form; private Command cmdExit; private DateField df; public Kalender() { tampil = Display.getDisplay(this); df = new DateField("Tanggal Sekarang : ",DateField.DATE); df.setDate(new java.util.Date()); cmdExit = new Command("Keluar",Command.EXIT,0); //Menambahkan aksi keluar form = new Form("Kalender J2ME"); //Title Form form.addCommand(cmdExit); form.append(df); form.setCommandListener(this); form.setItemStateListener(this); } public void startApp() { tampil.setCurrent(form); } public void pauseApp() {
  • 6. } public void destroyApp(boolean unconditional) { } public void commandAction(Command com,Displayable dis) { if(com == cmdExit) { destroyApp(true); notifyDestroyed(); } } public void itemStateChanged(Item itm) { df.setLabel("Tanggal Baru: "); } } Referensi : 1. http://www.mediatutorial.web.id/2012/06/java-me-no1-pengertian-javame-j2me-apa.html 2. http://marisharingilmu.wordpress.com/tag/contoh-program-j2me/