JavaFX 21 Tutorial 1 - TextField

Опубликовано: 05 Октябрь 2024
на канале: Ken
586
7

In this tutorial, I will show you how to use a text file using JavaFX 21 LTS with IntelliJ 2023.2.2.

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.

#javafx21 #textfield