B4J Question add image to button

ilan

Expert
Licensed User
Longtime User
hi

i want to add an image to a button via designer but i get this error:

 

Daestrum

Expert
Licensed User
Longtime User
After a quick test it looks like you need to add it to files in the designer and assets


Hope this helps.

Oops I uploaded the wrong picture originally. (it was a background not a button)
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
the weird thing is that i can add an image to an imageview but not to a button (even if i choose the same image)
maybe something with the javafx version?
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Odd I had no problem adding an image to a button using the designer.

Didn't realise it was so easy to do, and I never had to write any css.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
The problem is probably because of the parenthesis in the path. Try to move the project to a new folder without parenthesis.

thanx @Erel, moving the folder to a different path (or removing the "()" ) worked, but still i don't understand why it worked on imageviews but not on buttons??

anyway it is now working, thanx
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…