📜  JavaFX UI控件

📅  最后修改于: 2020-10-14 06:01:03             🧑  作者: Mango

JavaFX UI控件

本教程的这一部分向您提供JavaFX UI控件的深入知识。每个桌面应用程序的图形用户界面主要考虑UI元素,布局和行为。

UI元素是实际显示给用户进行交互或信息交换的元素。布局定义屏幕上UI元素的组织。行为是UI元素上发生某些事件时的反应。

但是,包javafx.scene.control为UI组件(如Button,Label等)提供了所有必需的类。每个类都代表一个特定的UI控件,并定义了一些样式设计方法。

SN Control Description
1 Label Label is a component that is used to define a simple text on the screen. Typically, a label is placed with the node, it describes.
2 Button Button is a component that controls the function of the application. Button class is used to create a labelled button.
3 RadioButton The Radio Button is used to provide various options to the user. The user can only choose one option among all. A radio button is either selected or deselected.
4 CheckBox Check Box is used to get the kind of information from the user which contains various choices. User marked the checkbox either on (true) or off(false).
5 TextField Text Field is basically used to get the input from the user in the form of text. javafx.scene.control.TextField represents TextField
6 PasswordField PasswordField is used to get the user’s password. Whatever is typed in the passwordfield is not shown on the screen to anyone.
7 HyperLink HyperLink are used to refer any of the webpage through your appication. It is represented by the class javafx.scene.control.HyperLink
8 Slider Slider is used to provide a pane of options to the user in a graphical form where the user needs to move a slider over the range of values to select one of them.
9 ProgressBar Progress Bar is used to show the work progress to the user. It is represented by the class javafx.scene.control.ProgressBar.
10 ProgressIndicator Instead of showing the analogue progress to the user, it shows the digital progress so that the user may know the amount of work done in percentage.
11 ScrollBar JavaFX Scroll Bar is used to provide a scroll bar to the user so that the user can scroll down the application pages.
12 Menu JavaFX provides a Menu class to implement menus. Menu is the main component of any application.
13 ToolTip JavaFX ToolTip is used to provide hint to the user about any component. It is mainly used to provide hints about the text fields or password fields being used in the application.