Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scene builder won't open

Tags:

fxml

javafx-2

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

like image 201
Marc Ionut Stegarescu Avatar asked Aug 12 '14 02:08

Marc Ionut Stegarescu


1 Answers

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

like image 61
Marc Ionut Stegarescu Avatar answered Oct 04 '22 06:10

Marc Ionut Stegarescu