Building Hello World Using Codename One
_A quick tutorial for building/debugging a hello world application using Codename One
_
We start by creating a new project in NetBeans and selecting the Codename One project.
We start by creating a new project in NetBeans and selecting the Codename One project.
Use A Proper Package Name For the Project
_It is important to use proper package names for the project since platforms such as iOS & Android rely on these names for future updates.
Projects Default To GUI Builder Project
_By default this project is a GUI builder project so we open the Codename One Designer with the content of this file.
The Default Theme In Codename One Derives From The Platform Native Theme
_The default Codename One theme, derives from the platform native theme. We can easily change the "base theme" in the preview to see how the theme will act in different devices by clicking the native theme option in the application menu.
You Can Easily Edit The GUI By Selecting The GUI Form And Manipulating the Components Visually
_Now we can edit the generated GUI and makes changes to the screens within the GUI builder. We can bind an action event to the button and go to the code to show a dialog.
Binding Events To The Source Is Trivial And You Can Invoke The Codename One API To Do Anything
_Now we can edit the generated GUI and makes changes to the screens within the GUI builder. We can bind an action event to the button and go to the code to show a dialog. Just insert the code: Dialog.show("Hello", "Hi There", "OK", null);
You Have a Device Simulator, Debugger, Profiler etc. at your disposal
A CodenameOne Project is effectively a standard Java project and you can use pretty much any Java tool to debug/monitor and work with Codename One.
Sending a Build For Device Is Just a Right Click Away (follow our signing tutorial though)
_Now lets send a device build for a platform this is pretty trivial to accomplish by right clicking the project and selecting the device. The signing tutorial should be followed if you want to build for devices and have a binary you can actually use!
The Build Server Allows You to Monitor Your Builds & Send Them To The Device Directly
_
In the build server we can now see the progress of the build and the results for the build sent. We can email a link to the deployment files, download them or even use a QR reader to install them to the phone. We intend to offer a feature that pushes builds directly to development devices soon.
In the build server we can now see the progress of the build and the results for the build sent. We can email a link to the deployment files, download them or even use a QR reader to install them to the phone. We intend to offer a feature that pushes builds directly to development devices soon.