r/JavaFX • u/Pussyslayerl • 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
2
u/mimoguz Jun 19 '21 edited Jun 19 '21
Adding to u/your_mom_lied said, also don't forget the JavaFX docs. If you go to https://openjfx.io/javadoc/16/ and type "Image" in the search box on the upper-right, you will see javafx.scene.image.Image on the top of the results. Click that, and you find info about what it is, how to use it (with code samples), and what to use to display an image (don't forget to click on that link too). Then do same thing with BorderPane.
2
1
Jun 24 '21
Maybe less pussy slaying and more studying..
1
u/Pussyslayerl Jun 24 '21
Unfortunately, it's just a nickname I'm still a virgin.
1
u/Birdasaur Jun 26 '21
Don't worry... JavaFX is your new harsh mistress. You will be making love to it in no time.
1
Jun 24 '21
Don't say still. That's something to be proud of. Don't worry, once you get married, the tap gets turned off anyway. Sad face....
3
u/your_mom_lied Jun 19 '21
That’s a pretty simple task.
Put your images in a project level directory.
Create your border pane and attach it to the scene.
Create your image objects and then add them as children of your border pane.
Google searches.
How to add a border pane to a scene
How to create an image object in javafx
How to add children to a border pane.
How to show a scene on the stage in javafx