Skip to content
Snippets Groups Projects
Commit 8d1ce51e authored by Jan Schubert's avatar Jan Schubert
Browse files

App

parent b7407ffe
No related branches found
No related tags found
No related merge requests found
Pipeline #325 passed with stages
in 1 minute and 22 seconds
package projekt.enigma;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.io.IOException;
/**
* JavaFX App
*/
public class App extends Application {
/**
* TODO Dokumentieren
*/
private static Scene scene;
/**
* TODO Dokumentieren
*
* @param fxml
* @throws IOException
*/
static void setRoot(String fxml) throws IOException {
scene.setRoot(loadFXML(fxml));
}
/**
* TODO Dokumentieren
*
* @param fxml
* @return
* @throws IOException
*/
private static Parent loadFXML(String fxml) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
return fxmlLoader.load();
}
/**
* TODO Dokumentieren
*
* @param args
*/
public static void main(String[] args) {
Application.launch();
}
/**
* TODO Dokumentieren
*
* @param stage
* @throws IOException
*/
@Override
public void start(Stage stage) throws IOException {
scene = new Scene(loadFXML("kenngruppe"));
stage.setScene(scene);
stage.setResizable(true);
stage.show();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment