r/JavaFX • • Jun 18 '21

beginner need help

hello, i just started my java classes, and i have a small homework in javaFX that i don't understand, can some one help me with it?

here is the question: Write a program that displays five images in a Border Pane

0 Upvotes

15 comments sorted by

View all comments

Show parent comments

3

u/mimoguz Jun 19 '21

Are you trying to load your images from c drive on Windows? Put "file:" before the path: Image("file:c:/path/to/the/image.png"). There is an example for that in the documents 😀

1

u/Pussyslayerl Jun 19 '21

woaaaaah, i'am so dumb, thnx a lot bro

2

u/your_mom_lied Jun 19 '21

You aren’t dumb. I had trouble writing paths to my assets the first time as well. I almost said something in my comment but I didn’t want to jinx you. I guess it’s common.