Java Reference
In-Depth Information
Color.WHITE);
BorderPane mainPane = new BorderPane();
mainPane.layoutXProperty().bind(scene.widthProperty().subtract(mainPane.widthProperty()).
divide(2));
root.getChildren().add(mainPane);
final Label label = new Label("Files Transfer:");
final ProgressBar progressBar = new
ProgressBar(0);
final ProgressIndicator progressIndicator = new
ProgressIndicator(0);
final HBox hb = new HBox();
hb.setSpacing(5);
hb.setAlignment(Pos.CENTER);
hb.getChildren().addAll(label, progressBar,
progressIndicator);
mainPane.setTop(hb);
final Button startButton = new Button("Start");
final Button cancelButton = new Button("Cancel");
final TextArea textArea = new TextArea();
textArea.setEditable(false);
textArea.setPrefSize(200, 70);
final HBox hb2 = new HBox();
hb2.setSpacing(5);
hb2.setAlignment(Pos.CENTER);
hb2.getChildren().addAll(startButton,
cancelButton, textArea);
mainPane.setBottom(hb2);
// wire up start button
startButton.setOnAction((e) -> {
startButton.setDisable(true);
progressBar.setProgress(0);
progressIndicator.setProgress(0);
textArea.setText("");
Search WWH ::




Custom Search