B4J Tutorials

B4J Download and Install

Last edited:

What is B4J?

Last edited:

Working with JavaFX Scene Builder

This is an old and irrelevant tutorial.
 
Last edited:

UI App (JavaFX) Tutorial

When you create a new UI project, the project starts with a single code module with the following code:
B4X:
#Region  Project Attributes
   #MainFormWidth: 500
   #MainFormHeight: 500
#End Region...
 
Last edited:

FlickrViewer

SS-2013-11-13_12.43.15.jpg


This example downloads an html page, parses it and finds the image links. It then uses a class named ImageDownloader to...
 

Attachments

  • FlickrViewer.zip
    3.2 KB · Views: 1,033

Moving Smiley Example

SS-2013-11-18_12.26.26.png


This example uses a Canvas node together with a Timer to draw a moving smiley.

The Canvas node is a special node the you...
 

Attachments

  • Smiley.zip
    3.7 KB · Views: 1,500

DBUtils Example

Attachments

  • DBUtils.zip
    6.6 KB · Views: 1,751
Last edited:

AsyncStreamsObject - Send and receive objects over the network

For new projects it is recommended to use B4XSerializator instead of this solution.



SS-2013-11-14_13.26.52.png


AsyncStreamsObject allows you...
 

Attachments

  • AsyncStreamsObject.zip
    4.1 KB · Views: 3,306
Last edited:

GuessMyNumber - Very simple example

SS-2013-11-18_13.19.20.png


The computer chooses a number and you need to find the correct number.
B4X:
Sub Process_Globals
   Private fx As JFX...
 

Attachments

  • GuessMyNumber.zip
    1.3 KB · Views: 893

RDC client

Attachments

  • RDC-Client.zip
    3.4 KB · Views: 1,414

Modal dialogs

B4J allows you to show modal dialogs or modal forms.
The difference between a modal form to non-modal form is that with a modal form the calling code will only continue after the form is closed...
 

Attachments

  • ModalExample.zip
    2 KB · Views: 2,045
Last edited:

Non-UI Applications

B4J currently supports two types of applications: UI applications (based on JavaFX) and Non-UI applications.

Non-UI applications are standard Java applications. Usually the input to such...
 

Attachments

  • curl.zip
    2.8 KB · Views: 1,201
Last edited:

B4J tutorial for Basic4android developers

B4J development tool is similar to Basic4android. The language and IDE are mostly identical.

The APIs (methods, keywords and libraries) are identical in some cases and different in other cases...
 

B4J documentation page

Working with files

The File methods in B4J are identical to B4A File methods.

Text file methods

File.WriteString - Writes the given text to a new file.
File.ReadString - Reads a file and...
 
Last edited:

B4J CCTV example

SS-2013-11-20_10.37.00.png


This example is similar to the previous example...
 

Attachments

  • CCTV-B4A.zip
    9.8 KB · Views: 2,605
  • CCTV-B4J.zip
    1.4 KB · Views: 2,696

Charts Framework

Attachments

  • Charts.zip
    5.1 KB · Views: 1,607
Last edited:

Using JavaObject and JavaFx - LineChart

To help with my own learning I have played with JavaObject and JavaFX to create linecharts.

Here are the 3 examples I have made I have ported the code directly from the Oracle...
 

Attachments

  • 3-1.zip
    1.1 KB · Views: 1,052
  • 3-4.zip
    1.2 KB · Views: 846
  • 3-5.zip
    1.4 KB · Views: 954
Last edited:

Magnifying glass example

SS-2013-11-24_15.10.06.jpg


A Canvas node is used to magnify a small window under the mouse cursor.

The main code is:
B4X:
Sub iv_MouseMoved...
 

Attachments

  • MagnifyingGlass.zip
    99.5 KB · Views: 868
Last edited:

Parsing huge text files

The JVM (Java Virtual Machine) performance is quite amazing.

This means that we can use B4J to build apps that handle huge files.
I downloaded a 3.7GB log file from this server. Each line...
 
Top