From the course: JavaFX: Properties, Beans, and Bindings

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

What is a JavaBean?

What is a JavaBean? - JavaFX Tutorial

From the course: JavaFX: Properties, Beans, and Bindings

Start my 1-month free trial

What is a JavaBean?

- [Instructor] Java Bean is a class that is designed based on the Java Bean's component architecture. It follows a certain design pattern which makes it suitable for reuse across different applications. JavaFX uses Java Beans extensively in its applications for binding the model or the detail lair with the view lair where the data is stored in the form of beans. And the gooey components can then be bound to these beans. A java bean is defined as a class that has its member variables of property data types and they are all declared as private. These properties have their getters and setters that are defined as public. There are some variations to this rule when you want to make read-only bean or write-only bean. In those cases, you would not make the getter or the setter public. The bean also has a default constructor. That is a constructor with no parameters. And the bean must follow a certain naming convention for its properties and methods. So as an example, let us say we want to…

Contents