Blackberry JAVA DEVELOPMENT ENVIRONMENT 시작하기 매뉴얼 - 페이지 14
{카테고리_이름} Blackberry JAVA DEVELOPMENT ENVIRONMENT에 대한 시작하기 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. Blackberry JAVA DEVELOPMENT ENVIRONMENT 32 페이지. Version 4.7.0
Blackberry JAVA DEVELOPMENT ENVIRONMENT에 대해서도 마찬가지입니다: 릴리스 노트 (8 페이지)
Getting started guide
3. In the constructor, add the following code:
super();
LabelField title = new LabelField("HelloWorld Sample", LabelField.ELLIPSIS |
LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField("Hello World!"));
Allow the HelloWorld application display a screen
pushScreen()
The
method is inherited from the
and paints it. The BlackBerry® JVM maintains screens in a display stack. See
information.
HelloWorld
>
In the
//display a new screen
pushScreen(new HelloWorldScreen());
Display a message when a BlackBerry smartphone user closes the HelloWorld
application
The
onClose()
method is inherited from the
a close event has occurred.
The
Dialog.alert()
method creates an alert dialog box that a BlackBerry device application can use to notify a
BlackBerry smartphone user of an event or some important information. The dialog uses an exclamation mark
bitmap. See
Dialog
in the API Reference for more information.
>
In the HelloWorldScreen class, overide the onClose() method using the following code:
public boolean onClose()
{ Dialog.alert("Goodbye!");
System.exit(0);
return true;
}
Test the HelloWorld application in the BlackBerry Smartphone Simulator
1.
From the Run menu, click Run As > BlackBerry Simulator.
2. In the Choose a launch Configuration dialog box, select a launch configuration.
3. Press OK.
4. From the HomeScreen of the BlackBerry® Smartphone Simulator, select and open the HelloWorld . The
BlackBerry device application displays the text HelloWorld!.
5. From the FullMenu of the BlackBerry device application, select the Close menu item. The BlackBerry device
application displays a dialog with the text Goodbye!.
14
constructor, add the following code:
Screen
UiApplication
class and pushes a screen onto the display stack
class and indicates to an BlackBerry® device application that
Screen
in the API Reference for more