46 lines
1.0 KiB
Java
46 lines
1.0 KiB
Java
package de.throsenheim.gui.u01search;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.scene.control.Label;
|
|
import javafx.stage.Stage;
|
|
|
|
|
|
// Deklarativ
|
|
public class SearchMain extends Application {
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
|
|
@Override
|
|
public void start(Stage primaryStage) throws Exception {
|
|
Parent dialog = FXMLLoader.load(this.getClass().getResource("SearchMain.fxml"));
|
|
|
|
Scene scene = new Scene(dialog, 200, 200);
|
|
primaryStage.setScene(scene);
|
|
primaryStage.show();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// Programmatisch
|
|
/* public class SearchMain extends Application {
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
|
|
@Override
|
|
public void start(Stage primaryStage) throws Exception {
|
|
Label label = new Label("Hello");
|
|
|
|
Scene scene = new Scene(label, 200, 200);
|
|
primaryStage.setScene(scene);
|
|
primaryStage.show();
|
|
}
|
|
}
|
|
|
|
*/ |