B4J Tutorials

[WebApp] Quiz Example

SS-2014-04-22_14.46.08.png

Online link: http://basic4ppc.com:51042/quiz/index.html

This is an example of an online quiz. When the...
 

B4J HelloWorld(s) Examples

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...
 

Attachments

  • B4JHowToHelloWorlds.zip
    23.4 KB · Views: 1,731
Last edited:

In-line Java in multiple modules

I have been using the in-line java for ages and only just discovered that you do not have to put all the code in one module, as I was previously doing.
It can be placed in the module to which it...
 

Attachments

  • java code modules test.zip
    1.6 KB · Views: 678

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: 702

Nodes / Views / Controls - Tips

I'll try to collect tips related to the UI elements in this thread.

In B4J (and JavaFX) the main UI element is named Node. It is similar to Basic4android View or Basic4ppc (.Net) Control.

B4J...
 

The FASTEST SQLite tables

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,284
  • webview2.zip
    2.6 KB · Views: 1,441
  • webview3.zip
    3.6 KB · Views: 1,379
  • webview4.zip
    3.8 KB · Views: 1,607
Last edited:

Charts Framework

Attachments

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

[WebApp] Concurrent access to SQLite databases

SQLite databases are very easy to use as they don't require any additional software or configuration.

SQLite support for concurrent access is not comparable to server based databases such as...
 
Last edited:

[Server] Guess My Number example

The purpose of this example is to demonstrate how you can interact with the server through ajax requests.

SS-2014-02-04_13.10.42.png


The server...
 

Attachments

  • ServerGuessMyNumber.zip
    2.4 KB · Views: 957

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:

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: 1,081

jexcell and other librairies

How do I install the jexcell bookstore?
In fact I can not find it on the site.
 

[WebApp] Example Task Manager using WebSockets & SQLite

This example is a simple Task Manager using HTML to access the server by the Client.
The tasks are stored in a SQLite database, which is managed by the B4J WebServer.
Read...
 

[WebApp] (mini) Template Engine

WebUtils.ReplaceMap together with the CreateMap keyword are useful for building dynamic strings, especially for html output.

For example, in the chat example when a user writes a message we...
 

[Server] Performance measures

B4J server library is based on an open source project named Jetty.
Jetty server performance is excellent which means that B4J server performance is also excellent.

The following numbers are the...
 

What is B4J?

Last edited:

[WebApp] Custom Elements - DatePicker & Dialogs

The web app framework can be easily extended with new elements and new features.

In this example we use two elements from jQuery UI library...
 

Attachments

  • DatePicker.zip
    3.6 KB · Views: 1,451

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: 1,124

String to variable - Iterate variable names

This is a simple idea to replace the function "eval" or "execute" that other programming languages have. The purpose is to retrieve a variable from a string:

How to iterate variable...
 
Top