34

I have an fxml file that I created using SceneBuilder 2.0. This file is used in my JavaFx project that I am developing using Netbeans 8. Today, SceneBuilder stopped working with my file. When I tried to open it, SceneBuilder would minimize and would not open the file. I don't have any custom components in my scene graph.

I copied the contents of the file into a new fxml file and gave it a new name. SceneBuilder was then able to open this file even though the contents are identical to the file that it is unable to open.

What is going on here?

my apologies, but I am unable to post the contents of the fxml file.

Justin Wiseman
  • 780
  • 1
  • 8
  • 27

7 Answers7

113

Okay.. so here I am searching for the solution for this weird problem! Seeing none of the other answers working for me, I did the random most thing I could think of and it worked.

Open SceneBuilder (a brand new one). Go to File > Open Recent > Clear Menu. Close Scene Builder.

Now the bug should be fixed (it did for me)

PS: I am ashamed of posting this answer. But since this is a nasty bug which wasted time, I don't want anyone else to waste theirs'.

PPS: Also, I can't double-check this solution, since it worked for me and I can't recreate the buggy scenario anymore.

sinujohn
  • 2,506
  • 3
  • 21
  • 26
5

I solved this problem by alt-tabbing to the SB program, then maximizing the window (shortcut: window key + up arrow key).

Seems to be a SB bug.

Richard Feng
  • 51
  • 1
  • 1
3

I had the same problem. looks like it is a bug.

I have solved it by Creating a new FXML file (Empty) and copied all the code of original FXML file to it . The new FXML opened by SceneBuilder.

2

Also had this issue with Win 7. Trick is to right click the SB task bar icon, maximize the window, drag it down by the title bar and a real tiny window should show up, re-size the window and that should do it. I think it's an SB display bug. Good luck.

Sam1am
  • 31
  • 4
  • 1
    Thaks very much, but to do the right click you dont do it on the taskbar icon itself, you just hover the mouse on the icon, then click on the panel that shows up with the right button and then maximize it. – Mateus Viccari Sep 01 '14 at 13:09
  • I would like to verify this answer, I wonder why OP hasn't accepted this answer. I had the same problem and this trick seems to correct it. All I did is to copy the project created on Windows to Ubuntu. Open FXML there in Linux Scene Builder, make some changes and then copy back to Window, bamm Windows based Scene builder wouldn't open it now, just some invisible window. And now open correctly each time. Some sort of weird display bug, or maybe Linux scene builder added some character which windows based scene builder didn't like at all. – Indigo Sep 13 '14 at 20:30
1

Spent about 4 hours and this is how I solved it. In my FXML document, I had a FlowPane with a </child> tag. I changed it to <child></child> and it worked. SceneBuilder opened the FXML document. I know this is silly, and I can't explain why this happens, but I can reproduce it.

Chrisuu
  • 272
  • 3
  • 13
1

For me the problem was with the path of the image i was giving in the FXML file. i was able to solve the issue by using @ followed by image path. With this syntax error you will be able to run your application, but the scene builder will refuse to open the file.

for eg(assuming that you are providing relative path):

Wrong syntax:

               <ImageView fitHeight="31.0" fitWidth="40.0" pickOnBounds="true" preserveRatio="true" >
                   <image>
                       <Image url="img/image.png"></Image>
                   </image>
               </ImageView>

Correct syntax:

               <ImageView fitHeight="31.0" fitWidth="40.0" pickOnBounds="true" preserveRatio="true" >
                   <image>
                       <Image url="@/img/1000px-evobus.svg1.png"></Image>
                   </image>
               </ImageView>
Thonse
  • 31
  • 1
  • 5
0

In NetBeans go to Tools; Options;Java; JavaFX and set the path to the Scene Builder Home. That should fix the problem

venkat
  • 1