Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sample;
- import com.sun.prism.paint.Color;
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.geometry.Pos;
- import javafx.scene.Group;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.scene.layout.BorderPane;
- import javafx.scene.layout.GridPane;
- import javafx.scene.layout.HBox;
- import javafx.scene.layout.VBox;
- import javafx.stage.Stage;
- import javafx.scene.Scene;
- import javafx.scene.control.TextField;
- import java.awt.*;
- import javafx.scene.control.Button;
- import javafx.scene.control.Label;
- public class Main extends Application {
- @Override
- public void start(Stage primaryStage) throws Exception{
- BorderPane root = new BorderPane();
- HBox v = new HBox();
- HBox v2 = new HBox();
- Label label = new Label("name");
- v.getChildren().add(label);
- v.setAlignment(Pos.CENTER);
- root.setCenter(v);
- Scene ob = new Scene(root,300,400);
- primaryStage.setScene(ob);
- primaryStage.show();
- }
- public static void main(String[] args) {
- launch(args);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement