Tutorial Goal

In that tutorial, you’re going to learn how to add more components to the first created JavaFX Application with VS Code.

Guidage → Incitation → Tooltip

Guidage → Groupement / distinction par la localisation→ Radio button & checkbox

Guidage → Feedback→ ProgressBar

Gestion des erreurs → Error message

Contrôle explicite→ Actions explicites → Confirm the exit

Adaptabilité → Flexibilité → Edit menu

Components

Text Field, exit button, tooltip, checkbox, radio button, progress bar, error message, exit confirmation window

1. Imports

import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.control.*; 
import javafx.scene.layout.*;
import javafx.collections.*; 
import javafx.scene.text.Text.*; 
import javafx.scene.text.*;
import java.util.UUID;

2. TextField

A component that allows the user to enter a line of unformatted text, it does not allow multi-line input it only allows the user to enter a single line of text.

TextField textb = new TextField("UUID");
textb.setText(uuid);
textb.getText();

3. Tooltip

The Tooltip class represents a common UI component that is typically used to display additional information about the UI control. The tooltip can be set on any control by calling the setTooltip method.

Tooltip args