B4J Tutorial B4J HelloWorld(s) Examples

rwblinn

Well-Known Member
Licensed User
As a helper to get started with B4J, some classical HelloWorld type of apps.
B4J offers many solutions in the way an app(lication) can be developed.

Status: 20150502

Below examples showing HelloWorld :)

UILayoutDesigner
UI App showing a Form which layout is designed using the Designer e.g. JavaFX SceneBuilder.

UIMessageDialog
UI showing a second Form to display the HelloWorld message when clicking on a button at the mainform.

UILayoutCode
UI App showing a Form which layout is designed using code.

UIInlineJava
UI showing a message dialog using Inline Java.

NonUI
NonUI App displaying HelloWorld to the console.

NonUIwithJFrame
NonUI App displaying an UI Frame using Inline Java.

NonUIwithSwing
NonUI App displaying an UI Swing Dialog using Inline Java.

WebApp
Web based App showing HelloWorld and a button which display an JavaScript Alert Box.
Access using webbrowser with url and port like localhost:51042.

Additional Notes
* Requires B4J v2.8 or higher, Additional Libraries: javaobject
* To learn more, have a look at the B4J HowTos

Installation
Unpack the zip file, select a folder and load the B4J project in the IDE.

Enjoy,
 

Attachments

Last edited:

rwblinn

Well-Known Member
Licensed User
Update 20150502 - Post #1 lists all the examples.
UPD: NonUI
NEW: NonUIwithJFrame
NEW:NonUIwithSwing
Note
The last two examples came to mind when looking for B4J based UI apps running on a Raspberry Pi which do not use JavaFX (as these run in full screen with poor performance). This is an alternative way. Tested those and also more complex JFrame Forms - good results on a Raspberry Pi 2. Was fun exploring this option.
 
Last edited:
Top