├── .gitignore ├── fanfou.jdw ├── funny ├── HomeScreen.java └── Application.java └── funny.jdp /.gitignore: -------------------------------------------------------------------------------- 1 | # blackberry os 7 Temp File 2 | *.cso 3 | *.debug 4 | *.jad 5 | *.jar 6 | ~*~ 7 | 8 | # Mac OS 9 | 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /fanfou.jdw: -------------------------------------------------------------------------------- 1 | ## RIM Java Development Environment 2 | # RIM Workspace file 3 | # 4 | # This file is generated and managed by BlackBerry developer tools. 5 | # It SHOULD NOT BE modified manually. 6 | # 7 | [BuildConfigurations 8 | Debug 9 | Release 10 | ] 11 | DependenciesInWorkspace=0 12 | [ImplicitRules 13 | ] 14 | [Imports 15 | ] 16 | [ManifestImports 17 | ] 18 | [Projects 19 | funny.jdp 20 | ] 21 | [ReleaseActiveProjects 22 | funny.jdp 23 | ] 24 | -------------------------------------------------------------------------------- /funny/HomeScreen.java: -------------------------------------------------------------------------------- 1 | package fanfou.funny; 2 | 3 | import net.rim.device.api.ui.container.MainScreen; 4 | import net.rim.device.api.ui.Field; 5 | import net.rim.device.api.ui.component.Dialog; 6 | import net.rim.device.api.ui.component.RichTextField; 7 | 8 | class HomeScreen extends MainScreen { 9 | public HomeScreen() { 10 | setTitle("funny is share."); 11 | 12 | add(new RichTextField("Hello World!", Field.NON_FOCUSABLE)); 13 | } 14 | 15 | public void close() { 16 | Dialog.alert("Close Now"); 17 | super.close(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /funny.jdp: -------------------------------------------------------------------------------- 1 | ## RIM Java Development Environment 2 | # RIM Project file 3 | # 4 | # This file is generated and managed by BlackBerry developer tools. 5 | # It SHOULD NOT BE modified manually. 6 | # 7 | AddOn=0 8 | AlwaysBuild=0 9 | [AlxImports 10 | ] 11 | AutoRestart=0 12 | [ClassProtection 13 | ] 14 | [CustomBuildFiles 15 | ] 16 | [CustomBuildRules 17 | ] 18 | [DefFiles 19 | ] 20 | [DependsOn 21 | ] 22 | ExcludeFromBuildAll=0 23 | Exported=0 24 | [Files 25 | funny\Application.java 26 | funny\HomeScreen.java 27 | ] 28 | HaveAlxImports=0 29 | HaveDefs=0 30 | HaveImports=0 31 | [Icons 32 | ] 33 | [ImplicitRules 34 | ] 35 | [Imports 36 | ] 37 | Listing=0 38 | Options=-quiet 39 | OutputFileName=funny 40 | [PackageProtection 41 | ] 42 | RibbonPosition=0 43 | [RolloverIcons 44 | ] 45 | RunOnStartup=0 46 | SkipCompile=0 47 | StartupTier=7 48 | SystemModule=0 49 | Type=0 50 | -------------------------------------------------------------------------------- /funny/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Application.java 3 | * 4 | * com.funny, 2018 5 | * 6 | * Main Application 7 | */ 8 | 9 | package fanfou.funny; 10 | 11 | import net.rim.device.api.ui.UiApplication; 12 | import net.rim.device.api.ui.component.Dialog; 13 | 14 | /** 15 | * 16 | */ 17 | class Application extends UiApplication { 18 | public static void main(String[] args) { 19 | Application theApp = new Application(); 20 | 21 | theApp.enterEventDispatcher(); 22 | 23 | } 24 | 25 | public Application() { 26 | pushScreen(new HomeScreen()); 27 | } 28 | 29 | public static void errorDialog(final String message) { 30 | UiApplication.getUiApplication().invokeLater(new Runnable() { 31 | public void run() { 32 | Dialog.alert(message); 33 | } 34 | }); 35 | } 36 | } 37 | --------------------------------------------------------------------------------