JavaFX 15 Tutorial 1 - TextField

preview_player
Показать описание
In this tutorial, I will show you how to use a TextField using JavaFX 15 or later with IntelliJ 2020.2.3, JDK 15.0.1 and JavaFX Scene Builder 11.0.0 on Windows 10 x64.

You should download and install the following:

The Installed directories are as following:

C:\Program Files\Java\jdk-15.0.1
C:\Program Files\Java\javafx-sdk-15.0.1
C:\Program Files\SceneBuilder
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3

TextField

A text field can be used to accept or display a String value.

The getText() method gets the value of the text field.
The setText() method sets the value of the text field.

Wrapper Class

Wrapper classes are used to convert any data type into an object. As the primitive data types (e.g. int) are not objects.

The parseInt() method of the Integer class converts a String to an integer.
The valueOf() method of String class converts an integer to a String.

VM options
--module-path "C:\Program Files\Java\javafx-sdk-15.0.1\lib"

#JavaFX11 #IntelliJ
Рекомендации по теме
Комментарии
Автор

Very good, in fact, spectacular... I've been looking for a JavaFX tutorial with Intellij Idea for a while... it explains very well... I will recommend it to friends here in Brazil... Thanks for the initiative...

alfecjo
Автор

What happens if you enter a normal string in the textfield??

Yallanomnom