mirror of
https://codeberg.org/qg-info-unterricht/zpg-graphentester.git
synced 2026-03-24 20:48:26 +01:00
First Commit (Fobi)
This commit is contained in:
commit
2bff291a51
336 changed files with 88781 additions and 0 deletions
45
GraphenTester.java
Normal file
45
GraphenTester.java
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
import control.Controller;
|
||||
|
||||
/**
|
||||
* Dies ist die Startklasse für die GUI des Graphentesters
|
||||
* In BlueJ gibt es teilweise Probleme, dass die Menüs bei Mausklick nicht
|
||||
* offen bleiben. Dann bitte das Programm über die Main-Funktion starten.
|
||||
*
|
||||
* @author Dirk Zechnall, Thomas Schaller
|
||||
* @version 12.02.2021 (v6.6)
|
||||
*/
|
||||
|
||||
public class GraphenTester extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
try {
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/graphenalgorithmen.fxml"));
|
||||
Controller c = new Controller();
|
||||
loader.setController(c);
|
||||
VBox root = (VBox) loader.load();
|
||||
Scene scene = new Scene(root);
|
||||
Image icon = new Image("/view/icon.png");
|
||||
primaryStage.getIcons().add(icon);
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show();
|
||||
primaryStage.setOnCloseRequest(e->c.mBeenden(null));
|
||||
|
||||
|
||||
}
|
||||
catch(Exception e) {
|
||||
System.out.println(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
new Thread(() -> Application.launch(GraphenTester.class)).start();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue