Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
177 views
in Technique[技术] by (71.8m points)

java - Can i add a resources directory to SceneBuilder?

I'm working on a GUI javafx project in NetBeans where my Folders look like:

Proyect  
-src 
--view
---classes/.fxml/controllers and stuff like that
--...
-images
--all of the images that im gonna use
-...

I was having some troubles with the images' path so i added the 'images' Folder to the Sources folder of my project. But when i edit the .fxml's with SceneBuilder and add an image it uses the document' relatives path which doesn't load the image while running the app.

I've tried to use /image.png on the url's text field in Scene Builder which works, since i added the 'images' Folder to the Sources folder, while running the program but on SceneBuilder i'm not able to visualize the image or edit.

So i was wondering if there is some way to add a resources folder to Scene Builder, like in NetBeans, or something like that. Or maybe there are another simple way to solve this that i'm not seeing :(

question from:https://stackoverflow.com/questions/65894745/can-i-add-a-resources-directory-to-scenebuilder

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...