J2ME Command Class.

Slides:



Advertisements
Similar presentations
MIDP Mobile Information Device Profile Johnny Yau CIS 642 Prof. Insup Lee.
Advertisements

Search for MSDS By Chemical Name Enter name of Chemical / MSDS you wish to locate Then hit ‘enter’ or click on ‘GO’
Writing Your First MIDlet Running JAVA on a Cell Phone Jon A. Batcheller January 27, 2004.
Introduction to Java 2 Micro Edition Mark Balbes, Ph.D. Senior Software Engineer Jeff Brown Senior Software Engineer.
Cosc 4755 Low-level GUI APIs. Low-Level API Composed of Canvas and Graphics classes – GameCanvas will be covered later on Canvas is an abstract class,
Developing an Application with J2ME Technology Scott Palmer, Nat Panchee, Judy Sullivan, Karen Thabet, Sten Westgard.
Listener Interfaces  A mechanism for registering handlers that respond to external events  Motivation: Develop a Canvas class that:  supports drawing.
J2ME for Palm Speaker: Chen-Nien Tsai Adviser: Kai-Wei Ke.
Introduction to Mobility Java Technology Mobile and Wireless Networks.
Making Cell Phone Games An Overview Ray Ratelis Guild Software, Inc.
Developing J2ME Applications Mobile and Wireless Networks.
Multiple Device Graphical User Interface Generation Jinesh Parekh and Paul D. Johnson SE690 & SE696 Supervised by Dr. Jia October 17, 2003
Java Platform, Micro Edition (J2ME)
Java 2 Platform, Micro Edition (J2ME) By Xiaorong Wang.
J2ME and WAP Technologies CSCI – Independent Study Fall 2002 Presented by: Kashif Syed.
J2ME Java for Mobile Environments Based on J2ME In A Nutshell, by Kim Topley, O’Reilly & Associates Inc., 2002, and Tetris by Alexei Patinov.
An Introduction to the Java ME Project Jens A Andersson.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 12 Using the KToolbar Rob Pooley
Platforms and tools for Web Services and Mobile Applications J2ME based Applications Bent Thomsen Aalborg University 3rd and 4th of June 2004.
J2ME: M3G/11 Intro to J2ME. Prog. v Objectives: –to introduce M3G; –to start talking about "M3G Chapter 2. An Animated Model" u leave the floor,
Using J2ME to create Field Force Applications Chris Clark, MobileHWY, LLC.
1 Mobile Software Development Framework: Android 2/23/2011 Y. Richard Yang.
Mobile Applications and Java ME
Lecture 16Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 16 Bluetooth for MIDlets Rob Pooley
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 12 lcdui Rob Pooley
Spong Bluetooth game Developed by: Erik Matzols Fredrik Lindberg.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 13 lcdui and OXO Rob Pooley
2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 14 Various MIDlet examples Rob Pooley
모바일 자바 프로그래밍 MIDP RMS Ps lab 오민경. MIDP RMS  RMS (Record Management System)  MIDP 에서 정의하는 영속성을 지닌 자체 데이터 저장 공간  Record Store 의 집합으로 구성된 아주 간단한 데이터베이스.
Java 2 Platform, Micro Edition (J2ME)
3:00. 2:59 2:58 2:57 2:56 2:55 2:54 2:53 2:52.
1 Introduction to J2ME Outline MIDP Building J2ME Apps- Tool J2ME Wireless Toolkit Demo MIDlet Programming -- MIDlet Transition States -- Midlet Skeleton.
J2ME Programming. Java2 Micro edition Introduction 년 5 월 26 일 CLDC, MIDP 라이브러리 Reference :
Lab 2: J2ME: Java 2 Micro Edition (Writing Programs for Mobile Phones using Java) Luis F. G. Sarmenta draft 3/13/2008 MIT D-Lab ICT4D.
CSE403: MIDlets and Ant1 MIDlets and Ant April 3, 2003 Shane Cantrell Zach Crisman.
Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java.
1 Mobile Application Development Framework 4/16/2009 Richard Yang.
The Record Store ( ) Frank Ducrest. The Record Store 2 The Record Store provides persistence of data between MIDlet runs not quite a DBMS API.
Thái Duy Quý - Khoa CNTT-Đại học Đà Lạt
CS434/534: Topics in Networked (Networking) Systems WSN/Mobile Systems Yang (Richard) Yang Computer Science Department Yale University 208A Watson
Java N Amanquah.
Issuing Material to Work Orders DPI Vehicle Fleet Management
UNIT II J2ME Best Practices and Patterns
Java N Amanquah.
Java- LWUIT N Amanquah.
DPI Vehicle Fleet Management- DR-14
Mobile Software Development Framework: TinyOS, J2ME
Mobile Software Development Framework
Mobile Software Development Framework: Android
Adjusting Your Settings (WinGUI – Display SAP Transaction Names)
Top Fire Protection Services Ottawa available on Dubinskyconstruction
Kjava Programming.
J2ME User Interface I.
Display Time Confirmations DPI Vehicle Fleet Management DR-5
Display Material Master DPI Vehicle Fleet Management IM-3
Create Odometer Measurement Documents
Accept DD Form 1081 Advance Activity
Cancel Time Confirmations DPI Vehicle Fleet Management TE-4
DPI Vehicle Fleet Management DR-6
DPI Vehicle Fleet Management IM-4
Shane Cantrell Zach Crisman
W/o Completing a Physical Inventory DPI Vehicle Fleet Management IA-1
Java for Mobile Devices
DPI Vehicle Fleet Management DR-10
Process DD Form 1081-Advance
Java Programming COMP-417 Applet
(Work Orders W/One Operation) DPI Vehicle Fleet Management TE-2
Verify Charges under ZFB61 DPI Vehicle Fleet Management NS-3
APPLET PROGRAMMING.
Presentation transcript:

J2ME Command Class

J2ME Command Class      In the given J2ME Command Class example, we have set the various commands namely, screen, back, cancel, ok, help, stop, exit and item to the Midlet. And also set the priority for it such as 1, 2, 3 etc. In J2ME commands are used for keeping information of the commands, not the action. For defining actions, CommandListener class are used. In this example we are going to show different commands on the screen but we have not used CommandListner class into it, that's these commands will not perform any action.

Source Code of CommandMIDlet.java import javax.microedition.lcdui.*; import javax.microedition.midlet.MIDlet; public class CommandMIDlet extends MIDlet{   private Form form;   private Display display;   private Command screen, back, cancel, ok, help, stop, exit, item;        public CommandMIDlet(){   screen = new Command("Screen", Command.SCREEN, 1);   back = new Command("Back", Command.BACK, 2);   cancel = new Command("Cancel", Command.CANCEL, 3);   ok = new Command("Ok", Command.OK, 4);   help = new Command("Help", Command.HELP, 5);   stop = new Command("Stop", Command.STOP, 6);   exit = new Command("Exit", Command.EXIT, 7);   item = new Command("Item", Command.ITEM, 8);   }   public void startApp(){   display = Display.getDisplay(this);   Form form = new Form("Command Priority");   form.addCommand(screen);   form.addCommand(back);   form.addCommand(cancel);   form.addCommand(ok);   form.addCommand(help);   form.addCommand(stop);   form.addCommand(exit);   form.addCommand(item);   display.setCurrent(form);   }   public void pauseApp(){}   public void destroyApp(boolean destroy){   notifyDestroyed();   } }