-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.java
59 lines (43 loc) · 1.44 KB
/
App.java
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package uk.ac.soton.comp1206;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.stage.Stage;
/**
* JavaFX Perlin Noise thingy??
*/
public class App extends Application {
Stage window;
@Override
public void start(Stage stage) {
var javaVersion = SystemInfo.javaVersion();
var javafxVersion = SystemInfo.javafxVersion();
Stage window = new Stage();
window.setTitle("JavaFX " + javafxVersion + ", running on Java " + javaVersion);
var label = new Label("Hello");
Button button = new Button("Press me nerd");
button.setOnAction(e -> {
//Main.s
});
//Layout
//Layout or Bottom bar
HBox bottomBar = new HBox(10);
bottomBar.getChildren().addAll(label, button);
//Layout for the grid of blocks
var blockGrid = new GridPane();
//Layout for entire window
var layout = new BorderPane();
//layout.getChildren().addAll(blockGrid, bottomBar);
layout.setCenter(blockGrid);
layout.setBottom(bottomBar);
var scene = new Scene(layout, 640, 480);
window.setScene(scene);
window.show();
}
public static void main(String[] args) {
launch();
}
}