一聚教程网:一个值得你收藏的教程网站

热门教程

J2ME MIDP Currency Converter Tutorial for NetBeans

时间:2022-07-02 17:42:22 编辑:袖梨 来源:一聚教程网

j2me MIDP Currency Converter Tutorial for NetBeans IDE 4.0
Feedback http://www.netbeans.org/kb/articles/tutorial-currencyconverter-40.html
Feedback
The Currency Converter application you will build in this tutorial shows you how to:
start a j2me MIDP project
code a working j2me MIDP application, or MIDlet, using the IDE
create project configurations to test the application's performance on two different device emulators
The Currency Converter application converts amounts from one currency to two others. You can choose to display three different currencies: euros, yen, or dollars. You can also enter a value in one currency to be converted into the other selected currencies.
There are three Java source code files for the sample application:
ConverterMIDlet.java. The code for the MIDlet class.
Converter.java. A MIDP form that defines the main screen of the application as it appears on a mobile device.
Currencies Selector.java. A MIDP list that maintains the currencies and rates.
The first part of this tutorial will show you how to quickly install, run, and test the Currency Converter application, which is available as a sample project included in the IDE. In the second part of the tutorial, you will create a new project and add code to create and test the application yourself.
This tutorial should take approximately an hour to complete.
Requirements
You must have NetBeans IDE 4.0 and the NetBeans Mobility Pack 4.0 installed before you can start j2me MIDP development. See the j2me MIDP Development Downloadpage for instructions on downloading and installing the complete environment.
Installing and Testing the Sample Currency Converter Project
In this first section, you will see how quickly you can install and run a sample project on two different emulator devices.
Creating the Project Choose File > New Project. Under Categories, select Samples > Mobile. Under Projects, select Currency Converter. Click Next.

热门栏目