SlideShare a Scribd company logo
1 of 19
J2ME : GUI Programming

                          Rohan Chandane
                     rohan.chandane@gmail.com


These notes are created by me, Rohan Chandane as learning material while pursuing MSc(CA) from SICSR 2005-2007 (CC)
Use of Profile
 For GUI Programming we can use
 different Profiles
 Here, we will see Mobile Information
 Device Profile (MIDP)
3 things in MIDP
 MIDlets
 High-Level API
 Low-Level API
MIDlets
 All application using MIDP, derived from
 package
   javax.microedition.midlet
Continued…
 A MIDlet can exist in four different states
   Loaded
     MIDlet is loaded into the device
     The constructor is called,
     This is called the loaded state
   Active
     After loaded state of MIDlet, it is in the active
     state
     Until its paused or destroyed
Continued…
  Paused
    Applications should stop animations
    Release resources that are not needed
    This state avoids
       Resource conflicts with the application running in
       the foreground
       Unnecessary battery consumption
  Destroyed
    MIDlet gets Terminated
MIDlet life cycle
Continued…
 startApp()
   The program manager starts the
   application by calling the startApp()
   method, then MIDlet get loaded
 pauseApp()
   Pauses the MIDlet
Continued…
 destroyApp()
   provides an unconditional parameter
     If false - MIDlet is allowed to refuse its
     termination & Throws
     MIDletStateChangeException
   resumeRequest() - If a MIDlet need to
   resume activity, this informs application
   manager
Continued…
  notifyPaused() - If a MIDlet need to go to
  the paused state, this informs application
  manager
  notifyDestroyed() – In order to terminate,
  this informs application manager
User Interface Architecture
 MIDP 2.0 has two UI Package
   javax.microedition.lcdui
     lcdui - Liquid Crystal Display User Interface
   javax.microedition.lcdui.game
     For development of a wireless game UI
Continued…
 javax.microedition.lcdui divided into two
 logical groups
   High Level Group
   Low Level Group
Continued…
 High Level Group
   Classes provided are
     Perfect for development of MIDlets
        that target the maximum number of devices
     Heavily abstracted
        to provide minimal control over their look and feel
   Classes do not provide exact control over
   their display
Continued…
 High Level MIDP 2.0 UI classes
Continued…
 Low Level Group
   Classes provided are
     Perfect for MIDlets
        where we want precise control over the location and
        display of the UI elements
     If more control there is comes less portability
   It may not be deployable on certain devices
Continued…
 Low Level MIDP 2.0 UI classes




              And
          GameCanvas
Displayable Interface
 To show a UI element on a device
 screen Displayable Interface must
 implemented in Midlet
 Whether high or low level APIs, it have
 to implement Displayable Interface
 The Graphics class does not implement
 this interface
   Because it deals with low-level 2D graphics
   that directly manipulate the device's screen
Continued…
 Canvas and Screen implement the
 Displayable interface
High-Level API
 Event handling
   Two Categories of Events
     Command events
        Command events are triggered by key presses on
        the device
     Item events
        Item events are the result of visual components
        changing on the display

More Related Content

What's hot

J2ME Unit_01
J2ME Unit_01J2ME Unit_01
J2ME Unit_01
Prashanth Shivakumar
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)
Wambua Wambua
 
Javame sdk-datasheet-167819
Javame sdk-datasheet-167819Javame sdk-datasheet-167819
Javame sdk-datasheet-167819
Oscar Eduardo
 

What's hot (20)

J2ME Unit_01
J2ME Unit_01J2ME Unit_01
J2ME Unit_01
 
Mobile Application Development MAD J2ME
Mobile Application Development  MAD J2MEMobile Application Development  MAD J2ME
Mobile Application Development MAD J2ME
 
Introduction to j2me
Introduction to j2meIntroduction to j2me
Introduction to j2me
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Mobile Application Development MAD J2ME UNIT 2
Mobile Application Development  MAD J2ME UNIT 2Mobile Application Development  MAD J2ME UNIT 2
Mobile Application Development MAD J2ME UNIT 2
 
Presenting Cloud Computing
Presenting Cloud ComputingPresenting Cloud Computing
Presenting Cloud Computing
 
MOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMSMOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMS
 
J2 me 1
J2 me 1J2 me 1
J2 me 1
 
Blackberry Development Environment
Blackberry Development EnvironmentBlackberry Development Environment
Blackberry Development Environment
 
J2me Platform
J2me PlatformJ2me Platform
J2me Platform
 
Java J2ME
Java J2MEJava J2ME
Java J2ME
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)
 
Introduction to java micro edition
Introduction to java micro editionIntroduction to java micro edition
Introduction to java micro edition
 
IT6601 Mobile Computing Unit V
IT6601 Mobile Computing Unit VIT6601 Mobile Computing Unit V
IT6601 Mobile Computing Unit V
 
Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8
 
Javame sdk-datasheet-167819
Javame sdk-datasheet-167819Javame sdk-datasheet-167819
Javame sdk-datasheet-167819
 
Session1 j2me introduction
Session1  j2me introductionSession1  j2me introduction
Session1 j2me introduction
 
A Project Report on Insurance System with Tracking Manager
 A Project Report on Insurance System with Tracking Manager  A Project Report on Insurance System with Tracking Manager
A Project Report on Insurance System with Tracking Manager
 
Android internals
Android internalsAndroid internals
Android internals
 
Campus portal for wireless devices
Campus portal for wireless devicesCampus portal for wireless devices
Campus portal for wireless devices
 

Viewers also liked

MIDP GUI Development: Alert, List, Form, TextBox
MIDP GUI Development: Alert, List, Form, TextBoxMIDP GUI Development: Alert, List, Form, TextBox
MIDP GUI Development: Alert, List, Form, TextBox
Jussi Pohjolainen
 
11 Java User Interface Libraries for Developing Mobile Applications
11 Java User Interface Libraries for Developing Mobile Applications11 Java User Interface Libraries for Developing Mobile Applications
11 Java User Interface Libraries for Developing Mobile Applications
AEGIS-ACCESSIBLE Projects
 
Statistical Process Control Tools
Statistical Process Control ToolsStatistical Process Control Tools
Statistical Process Control Tools
Raja Farhan Saeed
 
AggreGate SCADA/HMI
AggreGate SCADA/HMI AggreGate SCADA/HMI
AggreGate SCADA/HMI
Tibbo
 

Viewers also liked (16)

MIDP GUI Development: Alert, List, Form, TextBox
MIDP GUI Development: Alert, List, Form, TextBoxMIDP GUI Development: Alert, List, Form, TextBox
MIDP GUI Development: Alert, List, Form, TextBox
 
Session2-J2ME development-environment
Session2-J2ME development-environmentSession2-J2ME development-environment
Session2-J2ME development-environment
 
Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)
 
Java ME CLDC MIDP
Java ME CLDC MIDPJava ME CLDC MIDP
Java ME CLDC MIDP
 
Session 3 J2ME Mobile Information Device Profile(MIDP) API
Session 3 J2ME Mobile Information Device Profile(MIDP)  APISession 3 J2ME Mobile Information Device Profile(MIDP)  API
Session 3 J2ME Mobile Information Device Profile(MIDP) API
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
 
It6611 mobile application development laboratory l t p c0 0 3 2
It6611 mobile application development laboratory l t p c0 0 3 2It6611 mobile application development laboratory l t p c0 0 3 2
It6611 mobile application development laboratory l t p c0 0 3 2
 
Cs 6611 mad lab manual
Cs 6611 mad lab manualCs 6611 mad lab manual
Cs 6611 mad lab manual
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
 
11 Java User Interface Libraries for Developing Mobile Applications
11 Java User Interface Libraries for Developing Mobile Applications11 Java User Interface Libraries for Developing Mobile Applications
11 Java User Interface Libraries for Developing Mobile Applications
 
Java ME - 02 - High Level UI
Java ME - 02 - High Level UIJava ME - 02 - High Level UI
Java ME - 02 - High Level UI
 
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsJava in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
 
Statistical Process Control Tools
Statistical Process Control ToolsStatistical Process Control Tools
Statistical Process Control Tools
 
AggreGate SCADA/HMI
AggreGate SCADA/HMI AggreGate SCADA/HMI
AggreGate SCADA/HMI
 
8 introduction to_java_script
8 introduction to_java_script8 introduction to_java_script
8 introduction to_java_script
 
Java script
Java scriptJava script
Java script
 

Similar to J2ME GUI Programming

Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS) Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS)
Amila Gamanayake
 
J2me Crash Course
J2me Crash CourseJ2me Crash Course
J2me Crash Course
guest860a03
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 

Similar to J2ME GUI Programming (20)

Scmad Chapter03
Scmad Chapter03Scmad Chapter03
Scmad Chapter03
 
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
 
Case study on tablet application for real time video, audio and ppt conversion
Case study on tablet application for real time video, audio and ppt conversionCase study on tablet application for real time video, audio and ppt conversion
Case study on tablet application for real time video, audio and ppt conversion
 
MIDP3.0, overview of a right Android rival
MIDP3.0, overview of a right Android rivalMIDP3.0, overview of a right Android rival
MIDP3.0, overview of a right Android rival
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOF
 
08 Midlet Basic
08 Midlet Basic08 Midlet Basic
08 Midlet Basic
 
Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS) Android Demonstration Solution (ADS)
Android Demonstration Solution (ADS)
 
J2me Crash Course
J2me Crash CourseJ2me Crash Course
J2me Crash Course
 
Final srs of academic a webpage based android app
Final srs of academic a webpage based android appFinal srs of academic a webpage based android app
Final srs of academic a webpage based android app
 
How to implement Micro-frontends using Qiankun
How to implement Micro-frontends using QiankunHow to implement Micro-frontends using Qiankun
How to implement Micro-frontends using Qiankun
 
Prepare and Manage Remote Applications through Virtualization
Prepare and Manage Remote Applications through Virtualization      Prepare and Manage Remote Applications through Virtualization
Prepare and Manage Remote Applications through Virtualization
 
The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022The ultimate guide to optimize your react native app performance in 2022
The ultimate guide to optimize your react native app performance in 2022
 
Compose Camp by GDSC NSUT
Compose Camp by GDSC NSUTCompose Camp by GDSC NSUT
Compose Camp by GDSC NSUT
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
 
Reuse features in Android applications
Reuse features in Android applicationsReuse features in Android applications
Reuse features in Android applications
 
"MIDP 3.0 Master Class"
"MIDP 3.0 Master Class""MIDP 3.0 Master Class"
"MIDP 3.0 Master Class"
 
Developing midlets
Developing midletsDeveloping midlets
Developing midlets
 
J2me step by step
J2me step by stepJ2me step by step
J2me step by step
 
Lecture 2: Android Introduction
Lecture 2: Android Introduction Lecture 2: Android Introduction
Lecture 2: Android Introduction
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 

More from Rohan Chandane

More from Rohan Chandane (12)

Agile Maturity Model, Certified Scrum Master!
Agile Maturity Model, Certified Scrum Master!Agile Maturity Model, Certified Scrum Master!
Agile Maturity Model, Certified Scrum Master!
 
Agile & Scrum, Certified Scrum Master! Crash Course
Agile & Scrum,  Certified Scrum Master! Crash CourseAgile & Scrum,  Certified Scrum Master! Crash Course
Agile & Scrum, Certified Scrum Master! Crash Course
 
An Introduction To Testing In AngularJS Applications
An Introduction To Testing In AngularJS Applications An Introduction To Testing In AngularJS Applications
An Introduction To Testing In AngularJS Applications
 
Agile :what i learnt so far
Agile :what i learnt so farAgile :what i learnt so far
Agile :what i learnt so far
 
Backbone js
Backbone jsBackbone js
Backbone js
 
Node js
Node jsNode js
Node js
 
Sencha / ExtJS : Object Oriented JavaScript
Sencha / ExtJS : Object Oriented JavaScriptSencha / ExtJS : Object Oriented JavaScript
Sencha / ExtJS : Object Oriented JavaScript
 
TIBCO General Interface - CSS Guide
TIBCO General Interface - CSS GuideTIBCO General Interface - CSS Guide
TIBCO General Interface - CSS Guide
 
Blogger's Park Presentation (Blogging)
Blogger's Park Presentation (Blogging)Blogger's Park Presentation (Blogging)
Blogger's Park Presentation (Blogging)
 
Parsing XML in J2ME
Parsing XML in J2MEParsing XML in J2ME
Parsing XML in J2ME
 
J2ME RMS
J2ME RMSJ2ME RMS
J2ME RMS
 
J2ME IO Classes
J2ME IO ClassesJ2ME IO Classes
J2ME IO Classes
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

J2ME GUI Programming

  • 1. J2ME : GUI Programming Rohan Chandane rohan.chandane@gmail.com These notes are created by me, Rohan Chandane as learning material while pursuing MSc(CA) from SICSR 2005-2007 (CC)
  • 2. Use of Profile For GUI Programming we can use different Profiles Here, we will see Mobile Information Device Profile (MIDP)
  • 3. 3 things in MIDP MIDlets High-Level API Low-Level API
  • 4. MIDlets All application using MIDP, derived from package javax.microedition.midlet
  • 5. Continued… A MIDlet can exist in four different states Loaded MIDlet is loaded into the device The constructor is called, This is called the loaded state Active After loaded state of MIDlet, it is in the active state Until its paused or destroyed
  • 6. Continued… Paused Applications should stop animations Release resources that are not needed This state avoids Resource conflicts with the application running in the foreground Unnecessary battery consumption Destroyed MIDlet gets Terminated
  • 8. Continued… startApp() The program manager starts the application by calling the startApp() method, then MIDlet get loaded pauseApp() Pauses the MIDlet
  • 9. Continued… destroyApp() provides an unconditional parameter If false - MIDlet is allowed to refuse its termination & Throws MIDletStateChangeException resumeRequest() - If a MIDlet need to resume activity, this informs application manager
  • 10. Continued… notifyPaused() - If a MIDlet need to go to the paused state, this informs application manager notifyDestroyed() – In order to terminate, this informs application manager
  • 11. User Interface Architecture MIDP 2.0 has two UI Package javax.microedition.lcdui lcdui - Liquid Crystal Display User Interface javax.microedition.lcdui.game For development of a wireless game UI
  • 12. Continued… javax.microedition.lcdui divided into two logical groups High Level Group Low Level Group
  • 13. Continued… High Level Group Classes provided are Perfect for development of MIDlets that target the maximum number of devices Heavily abstracted to provide minimal control over their look and feel Classes do not provide exact control over their display
  • 14. Continued… High Level MIDP 2.0 UI classes
  • 15. Continued… Low Level Group Classes provided are Perfect for MIDlets where we want precise control over the location and display of the UI elements If more control there is comes less portability It may not be deployable on certain devices
  • 16. Continued… Low Level MIDP 2.0 UI classes And GameCanvas
  • 17. Displayable Interface To show a UI element on a device screen Displayable Interface must implemented in Midlet Whether high or low level APIs, it have to implement Displayable Interface The Graphics class does not implement this interface Because it deals with low-level 2D graphics that directly manipulate the device's screen
  • 18. Continued… Canvas and Screen implement the Displayable interface
  • 19. High-Level API Event handling Two Categories of Events Command events Command events are triggered by key presses on the device Item events Item events are the result of visual components changing on the display