forked from hacker85/JavaLessons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFxmlLesson.java
More file actions
34 lines (28 loc) · 881 Bytes
/
FxmlLesson.java
File metadata and controls
34 lines (28 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package fx;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Group;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
/**
* Created by max on 3/2/17.
*/
public class FxmlLesson extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
Group group = new Group();
Scene scene = new Scene(group, 400, 300);
Parent content = FXMLLoader.load(getClass().getResource("form.fxml"));
BorderPane root = new BorderPane();
root.setCenter(content);
group.getChildren().add(root);
primaryStage.setTitle("Hello world!");
primaryStage.setScene(scene);
primaryStage.show();
}
}