Hello world of BlackBerry App

Source: Internet
Author: User

 

1. Install blackberry_email_mds_4.1.4.exeand blackberry_simulators_5.0.0.228_9700.exe

2. Install eclipse3.6

3. Install BlackBerry Java Plug-in for eclipse V1.1

4. Create a blackberry project. Choose File> New> Project> BlackBerry project.

Project name: helloworld

Click "finish" to complete Project Creation

5. Create a New Java class named helloworld with the following content:

 

Import net. rim. device. API. UI. field; <br/> Import net. rim. device. API. UI. uiapplication; <br/> Import net. rim. device. API. UI. component. dialog; <br/> Import net. rim. device. API. UI. component. labelfield; <br/> Import net. rim. device. API. UI. component. richtextfield; <br/> Import net. rim. device. API. UI. container. mainscreen; <br/> public class helloworld extends uiapplication {<br/> Public static void main (string [] ar GS) {<br/> helloworld theapp = new helloworld (); <br/> theapp. entereventdispatcher (); <br/>}< br/> Public helloworld () {<br/> pushscreen (New helloworldscreen ()); <br/>}< br/> final class helloworldscreen extends mainscreen {</P> <p> helloworldscreen () {<br/> super (); <br/> labelfield Title = new labelfield ("Hello world title", labelfield. ellipsis | labelfield. use_all_width); <br/> settitle (title ); <Br/> Add (New richtextfield ("Hello world! ", Field. non_focusable); <br/>}< br/> Public void close () {<br/> dialog. Alert (" goodbye! "); <Br/> super. Close (); <br/>}< br/>

 

6. Run helloworld In the BlackBerry SimulatorProgram

Right-click the helloworld project and choose run as> BlackBerry simulator.

In the displayed BlackBerry simulator window, click the menu button and then click the downloads icon. The newly created helloworld application icon appears. Click the helloworld icon to run the application, the helloworld program displays a helloworld tag in the application window.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.