Reputation: 81
I've been figuring out how to integrate Gluon Scene Builder into my IDE of choice and decided it would be a good share with the Stack Overflow community for those of you who have had trouble with this in the past. Keep in mind this is for those who have had prior experience with JavaFX and Gluon Scene Builder, minimal at least.
Upvotes: 1
Views: 12785
Reputation: 1557
Parameters/Preconditions used in this example:
c:\example\
scenebuilder-all-8.3.0-all.jar
Download "Executable JAR" from Gluon to folder c:\example\
.
Create Batch File "c:\example\scene_builder.bat" and add the following line:
"java.exe" -jar "%~dp0\scenebuilder-all-8.3.0-all.jar" %*
Double click batch file to test it, SceneBuilder should start
In Eclipse open Window - Preferences - JavaFX
SceneBuilder executable: c:\example\scene_builder.bat
Right click on fmxl File in Eclipse and click Open in ScenenBuilder
"java.exe"
If Java is not installed in the default way, specify the whole path to executable in quotation mark. "C:\Program Files\Java\jre1.8.0_131\bin\java.exe"
%~dp0\
Will open SceneBuilder JAR in the directory of the batch file
%*
Will pass all command line arguments passed to the batch file to SceneBuilder call
Upvotes: 5
Reputation: 21
I use IntelliJ IDEA IDEA to do some JAVA GUI application. It embeds the scene builder. However, you have to install scene builder as well. Here is the screen of it: 1. build a javafx application first 2. find your-application.fxml, then go to bottom left, there is a button Scene builder. (if you haven't install scene builder, it will ask you the path of your scene builder) Scene Builder
Upvotes: 0
Reputation: 360
You have to download scenebuilder. Once downloaded you need to move it as it is downloaded in a strange place.
You then need to add an external jar as a library.
If you have already got fx support in eclipse set up. Create a new java fx project. Then create a new fxml file. You should now be able to open the fxml file with scene builder by right clicking on it.
I cannot do it better than this guy on the video tutorial. You obvisouly need java fx support first which is covered in tutorial 2-3.
http://m.youtube.com/watch?v=2j-e1CHsqsE
Upvotes: 0
Reputation: 81
I haven't "scene" any posts directly addressing integration of SceneBuilder as a tutorial so I figured I would set it nice and simple since there were a few questions roaming around.
THIS GUIDE IS FOR ECLIPSE AND USES GLUON'S SCENEBUILDER
Note this guide is intended for those lightly to moderately experienced with JavaFX as an application builder
//INTELLIJ AND NETBEANS WILL COME LATER PER DEMAND FOR EACH
Alright guys, here we go.
Step 1) Open up your Eclipse IDE(preferably with JavaFX installed prior to installing SceneBuilder) and a web browser of your choice.
Step 2) Click or browse with this link: http://gluonhq.com/open-source/scene-builder/
Step 3) Once SceneBuilder is downloaded and installed, close SceneBuilder and find the .exe file on your PC(or Mac) where you chose to install it to or in it's default location.
Now we need to associate FXML files with SceneBuilder
Step 4) Associate FXML with SceneBuilder.
Still inside Eclipse, click Windows at the top > Preferences > search "File Associations"
Browse for the SceneBuilder.exe file path we copied earlier and click OK.
Step 5) Return to the Eclipse IDE and open up a JavaFX Project and name it "test".
File > New > Other > JavaFX Project OR (Ctrl + N) > JavaFX Project
Go into the src folder of test project.
Create an FXML file: test > src > application > New > Other > New FXML Document
Name your FXML file "testfx"
Congratulations, upon firing up your FXML document, you should be billed with a SceneBuilder window. If not you may not have associated FXML documents correctly.
Now how to implement the code is for a different time. For now this tutorial is all I've got within me! If you guys found this helpful, shoot me a pm and let me know! I appreciate your feedback and would like to be able to build upon this greatly.
Thanks guys,
Happy Programming!
Upvotes: 6