Hallo,
ich habe eine kleine JavaFX FXML Anwendung geschrieben und möchte nun die GUI aus einer andere Klasse ausrufen. Könnte mir jemand helfen.
[CODE lang="java" title="Ich vermute mal, dass ich irgendwie die start Methode aufrufen muss:"]import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Chat extends Application
{
@Override
public void start(Stage stage) throws Exception
{
Parent root = FXMLLoader.load(getClass().getResource("Chat.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
}[/CODE]
Danke schonmal!!!
ich habe eine kleine JavaFX FXML Anwendung geschrieben und möchte nun die GUI aus einer andere Klasse ausrufen. Könnte mir jemand helfen.
[CODE lang="java" title="Ich vermute mal, dass ich irgendwie die start Methode aufrufen muss:"]import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Chat extends Application
{
@Override
public void start(Stage stage) throws Exception
{
Parent root = FXMLLoader.load(getClass().getResource("Chat.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
}[/CODE]
Danke schonmal!!!