JavaFx监听进度条
2021-03-02 16:30
标签:stage ide cin res listener void min rri pos JavaFx监听进度条 标签:stage ide cin res listener void min rri pos 原文地址:https://www.cnblogs.com/xl4ng/p/14406132.htmlimport javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.Slider;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class App15_11 extends Application {
@Override
public void start(Stage primaryStage) {
final Slider slider = new Slider(); //创建滑动条
slider.setMin(0); //设置滑动条的最小值为0
slider.setMax(50); //设置活动条的最大值为50
final ProgressBar progressBar = new ProgressBar(); //创建不确定进度条
final ProgressIndicator progressIndicator = new ProgressIndicator(); //创建不确定进度饼图
ChangeListener