How to Create Button using J2ME Programming?
I am very new to the J2ME programming language. I have to create a button using the J2ME. So I thought to paste it here, so that I could get some help from you guys. Please provide me the code of creating the button in J2ME. Also if possible tell me more about the J2ME programming language as I don't know much about it. Hope that guys out there will help me soon..!!:notworthy
Re: How to Create Button using J2ME Programming?
Three important concepts of the Java 2 Micro Edition (J2ME) are :
Profiles, Configurations and the Optional Packages. For writing the J2ME application you will have to understand the concepts of three things mentioned above. Because these things determine the features of Java that you can use, which application programming interfaces (APIs) are available, and how your applications are packaged.
- Profile - A profile adds domain-specific classes to support specific uses of a device and to add a configuration to fill in missing functionality. The device must meet the minimum requirements of the underlying configuration, if you want to use a profile.
- Configuration - The configuration consists of three things and it is a complete Java runtime environment, three things are :
- Native code to interface to the underlying system.
- A Java virtual machine (VM) to execute Java bytecode.
- A set of core Java runtime classes.
- Optional Package - An optional package is a set of APIs in support of additional, common behaviors. All this things don't really belong in one specific configuration or profile.
Re: How to Create Button using J2ME Programming?
Since you are new to the J2ME Programming, I thought that providing the features of J2ME will be better. Because before doing the coding you should know all the core things and the features of the programming language that you are going to do the coding. So here are some features of the J2ME :
- Syntax highlighting for Java source.
- Code Folding : The java editor supports code folding for methods and classes.
- Professional IDE with Java Editor and Help.
- Advanced Code Completion and the Code Snippets.
- Code Templates and Code Assistance will save a time.
- No need to change to code, when Languages are added.
- Images available to any application object.
Re: How to Create Button using J2ME Programming?
There are two ways to create the Button using J2ME Programming :
- You can develop a CustomItem and use it with the rest of the high-level (Form-based) UI, this method can be used if you are using MIDP v2.
- Override appropriate key event handler methods in Canvas class to handle click events after drawing a button on the Canvas.
You can create a String ITem of BUTTON type if you are using the MIDP 2.0. It will look similar like a button on Sony Ericsson P900.
Hope that this will help you to create a button in J2ME.
Re: How to Create Button using J2ME Programming?
A family of APIs which specify application platforms that are typically implemented by embedded or handheld devices are the J2ME (Java 2 Micro Edition). Devices like PDAs (Personal Digital Assistants) and the high-end mobile phones are included in the Handheld devices. When the terms memory capacity and I/O capabilities comes, these platforms are typically limited. The main advantage of them are that they can transfer data over low bandwidth, intermittent wireless connections. The Software Development Kit (SDK) includes the following Kits :
- RIM SDK
- Motorola SDK
- Java SDK