шпаргалки
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

2 years ago
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javafxpaneexample_dist;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
/**
*
* @author denis
*/
public class HBoxExample {
private Stage stage;
public void init(){
stage = new Stage();
Button btn = new Button("Button 1");
Button btn2 = new Button("Button 2");
Button btn3 = new Button("Button 3");
Button btn4 = new Button("Button 4");
Button btn5 = new Button("Button 5");
Button btn6 = new Button("Button 6");
Button btn7 = new Button("Button 7");
HBox root = new HBox();
root.getChildren().addAll(btn, btn2, btn3, btn4, btn5, btn6, btn7);
Scene scene = new Scene(root, 300, 250);
stage.setTitle("HBox");
stage.setScene(scene);
stage.show();
}
}