Reputation: 309
When i right click the FXML document and click open with scene builder the scene builder opens on my taskbar but if i click it, it will not show anything can anyone please help me?
package application;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
Parent root = FXMLLoader.load(getClass().getResource(
"/application/MyView.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(
getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
setUserAgentStylesheet(STYLESHEET_CASPIAN);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
This is my main class
Upvotes: 10
Views: 7199
Reputation: 1
I installed scene builder from a different maker (gluon)
Works wonderfully.
Associate the FXML files in your SO to that they are open by this application instead of the "normal" one and you can forget about this problem.
Upvotes: 0
Reputation: 309
I found out that it is a bug and you have to open Scene Builder from your desktop and:
File>Preferences>Reset To BuiltIn Defaults
File>Open recent>clear menu
Upvotes: 19