-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMainController.java
More file actions
62 lines (45 loc) · 1.44 KB
/
MainController.java
File metadata and controls
62 lines (45 loc) · 1.44 KB
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
60
61
62
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.Parent;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.Node;
import javafx.scene.text.Text;
public class MainController {
@FXML
private ResourceBundle resources;
@FXML
private URL location;
@FXML
private Button btnCampain;
@FXML
private Button btnFreeplay;
@FXML
private Button btnScoreboard;
@FXML
private Text Menü;
@FXML
void actFreeplay(ActionEvent event) {
}
@FXML
void actScoreboard(ActionEvent event) {
}
@FXML
void actCampain(ActionEvent event) throws Exception{
Parent blah = FXMLLoader.load(getClass().getResource("view.fxml"));
Scene scene = new Scene(blah);
Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();
appStage.setScene(scene);
appStage.show();
}
@FXML
void initialize() {
assert btnCampain != null : "fx:id=\"btnCampain\" was not injected: check your FXML file 'daw.fxml'.";
assert btnFreeplay != null : "fx:id=\"btnFreeplay\" was not injected: check your FXML file 'daw.fxml'.";
assert btnScoreboard != null : "fx:id=\"btnScoreboard\" was not injected: check your FXML file 'daw.fxml'.";
}
}