B4J Tutorials

WSL Linux and B4x

If anyone is interested in being able to rapidly test desktop, console or server code in a headless environment using WSL, Linux and X11 I have prepared 19 ready to run distro's that can...
 
Last edited:

Working with JavaFX Scene Builder

This is an old and irrelevant tutorial.
 
Last edited:

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:

where to code put code when using multiple forms

I've started using B4J after using B4A for a few months. What is the best structure of the code when using multiple forms. Unlike B4A where each activity has its own code, or indeed with vb.net...
 

What is B4J?

Last edited:

WebView

Been trying WebView and WebEngine.

Here's a little example of using both. (requires additional library to run)

Shows how to retrieve the hyperlinks in a page and put them in a comboBox, also...
 

Attachments

  • webview.zip
    1.9 KB · Views: 2,009
  • webview2.zip
    2.6 KB · Views: 1,210
  • webview3.zip
    3.6 KB · Views: 1,155
  • webview4.zip
    3.8 KB · Views: 1,314
Last edited:

Webmin

Webmin is a great tool I discovered out of luck (in a YT Video) today. It is a very nice linux tool that you can use it to administer your linux machines from your browser. I installed it in my...
 

WebApps - Let's create a Morse Code Translator

Hi there

Let's explore how we can create a Morse code translator using Maps.

1. For this I have created a simple keyboard...

MorseCodeTranlator.gif


Related Content: http://www.learnmorsecode.com/...
 
Last edited:

Web Tools Collection - Enjoy

Hi

I'm putting this as a tutorial as we might loose it.

 

Web Push Notifications using the Notifications API

Hi

I just had the pleasure of looking at this Notifications API again. Below is my example.

1671621118774.png



You can get more infomation about it here...
 

Using Sql Server 2008 with Advance Project Management of Saif

Hi Members.

This is continuation of below post

Trying to restore the given...
 

Attachments

  • b4jpm_tables_2008_r2.sql.txt
    4.1 KB · Views: 241

Using Sliders

This is a simple example that shows :
Using sliders
Re-sizing windows
Changing background colour of a window
Truncating/Expanding text
Moving labels to keep pace with a slider button
Text with...
 

Attachments

  • SlidersAndText.zip
    2 KB · Views: 889

Using Resource Hacker to replace 'OpenJDK Platform' app name and icon

There are a few question threads about using Resource Hacker to make sure that your app name and icon appear everywhere you might want it to such as in the taskbar/Task Manager/File Properties...
 

Attachments

  • image_2021-12-11_191236.png
    image_2021-12-11_191236.png
    80.1 KB · Views: 338
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,055
  • 3-4.zip
    1.2 KB · Views: 851
  • 3-5.zip
    1.4 KB · Views: 958
Last edited:

Using external CSS file to style a ToggleButton

Tried
B4X:
aToggleButton.Style=":selected{-fx-background-color:black;}"
Not working for me. Any advice?
Furthermore, how can I relate the style of a node created by code with a css file?
 

Using CustomBuildAction with WinRAR

We can use #CustomBuildAction to archive some files and folders into a ZIP or RAR file (if you have WinRAR installed).

B4X:
#If RELEASE
#CustomBuildAction: 2, C:\Program...
 
Last edited:

Using CustomBuildAction to your advantage

2016-11-11-08_20_18-compile-build_-default-png.49919


CustomBuildAction is a powerful ally.

Generally to do anything useful you need to call a...
 

Attachments

  • Demo.zip
    1.5 KB · Views: 336
  • 2016-11-11 08_20_18-Compile (Build_ Default).png
    2016-11-11 08_20_18-Compile (Build_ Default).png
    13.8 KB · Views: 906

Use Timelines to 'slide' listviews

Using timelines, it's possible for two (or more if you change code) listviews to occupy the same space on a form.
This demo will slide one listview, revealing the hidden listview. (A bit like...
 

Attachments

  • sliding listviews.zip
    1.9 KB · Views: 488

USB Serial Port + AsyncStreams + B4XBytesBuilder

Attached project code:
B4X:
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form...
 

Attachments

  • Serial_Test.zip
    2.6 KB · Views: 321
  • Arduino_Serial_Test.zip
    554 bytes · Views: 258

Updated MySQL & PHP example

Before you start: You need some experience with php, Apache Servers, OkHttpUtils, Lists, Maps and JSON structures.

This is an updated example of how to

- communicate with a apache server via...
 

Attachments

  • PHP.zip
    6 KB · Views: 1,258
Top