If you're coding along and you are using intelliJ, make sure icon.png is in the resources sub folder of src > main. Otherwise, you'll be in for a wild safari of filepath issues.
For those who can't run it, because it throws an exception with the image (intelliJ 2022.3 version): If you click file/project stucture/modules, you can see the working directories on the right in colors. I put my image where the resourse folders points, and that's how I got is working!
I programmed Swing for 15 years, and then two years in JavaFX. I love JavaFX, but desktop apps seem to be dying out, so there is not much work in it. It's a shame, because I would love to continue with this work.
For all you Beginners, If you have your textures set up in the ressources folder, just type in the path excluding the ressources folder itself. Example: i have set up my textures in a folder called Soil, wich is inside the folder textures wich is inside the folder ressources. so what i put inside the Image-constructor is this: "/textures/soil/yourimagename.png" have a nice one. dont forget this about java: its more afraid of you than you are of it. :)
If you are trying to add images in intelliJ Idea right click on your project and add a new directory named as res right click on res and then go to mark directory as resources it will fix the issue
jeesus, it's insane how fast your channel grew from when I came in and you had less than 500 subs, huuuge respect man, and as always, indreadible content + explanation, please keep it up!!!
hey bro so i just watched your 12 hour java video, you really helped me a lot thank you! also, could u make more project videos so we can practice what we've learned?
Yo broo! I searched and searched for a biggener friendly javafx course Yours is totally biggener friendly ,informative ,helpful, useful +(doesn't make me sleepy) Can't thank u enough may Allah give u happiness and good health
Woooo 11th comment pwease pin Thank you so much bro code, ive been wstxhing your java tutorials and landed a job at a near by website development job, im so excited akd it was all because of you. After java what language do you sugest learning?
Congrats on the job! thanks Fam, but it was you who put in the work to get there! The language depends on the project. Mastering one language is the best, but if you work with web dev, Javascript wouldn't be a bad 2nd language.
congratulations Bro, congratulations .. in fact, you tutorials help me enormously in learning to program, java in particular .. I don't know if it's poss, I would like you to do some javaFX tutorials with MYSQL database .. how to connect, retrieve data, view, modify etc... please..
in case others are facing the same issue as me: just passing the file name to Image's constructor didn't work for me, passing "file:..." however did work (no errors), but the icon still didn't show. Image(getClass().getResourceAsStream("...")) fixed the issue for me, still don't know why tho
bro u r the best . u r excellent at giving tutorials. and please make a tutorial about grid pane ,stack pane , flow pane , adding text area and combobox .thanks
Another great video! Hey, I have a question. So, I saw your 4 hour video about Java GUI and now know how to create a small application. But, I don't know how to use MySQL Database to connect it to my Login and Register form. Would you please make a video about MySQL and how to use it with the Login Form? I would really appreciate it :)
I had COVID-19 while working on videos last week, so SMASH that like button for my effort 👍
package application;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.input.KeyCombination;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
//Stage stage = new Stage();
Group root = new Group();
Scene scene = new Scene(root,Color.BLACK);
//Image icon = new Image("icon.png");
//stage.getIcons().add(icon);
//stage.setTitle("Stage Demo Program w00t w00t");
//stage.setWidth(420);
//stage.setHeight(420);
//stage.setResizable(false);
//stage.setX(50);
//stage.setY(50);
//stage.setFullScreen(true);
//stage.setFullScreenExitHint("YOU CAN'T ESCAPE unless you press q");
//stage.setFullScreenExitKeyCombination(KeyCombination.valueOf("q"));
stage.setScene(scene);
stage.show();
}
}
@@aproe610 f
I hope you get better soon!
Can u plz make a video on making a runnable jar of Java fx using eclipse. 😢
If you're coding along and you are using intelliJ, make sure icon.png is in the resources sub folder of src > main. Otherwise, you'll be in for a wild safari of filepath issues.
thanks
Thank you!!!
Why tf I didn't have check the comment before? Thanks so much
Thank you
For those who can't run it, because it throws an exception with the image (intelliJ 2022.3 version):
If you click file/project stucture/modules, you can see the working directories on the right in colors. I put my image where the resourse folders points, and that's how I got is working!
Thanks :)
Thanks, you helped me a lot!
Thanks
You are amazing, thanks!
Bruh, your channel is just perfect
I programmed Swing for 15 years, and then two years in JavaFX.
I love JavaFX, but desktop apps seem to be dying out, so there is not much work in it.
It's a shame, because I would love to continue with this work.
I've been watching tutorials for a long time now. You sir, are amazing. The quality of this is Ivy league level. Thank you.
I'm Brazilian and i loved your video, thanks!
For all you Beginners, If you have your textures set up in the ressources folder, just type in the path excluding the ressources folder itself. Example: i have set up my textures in a folder called Soil, wich is inside the folder textures wich is inside the folder ressources. so what i put inside the Image-constructor is this: "/textures/soil/yourimagename.png" have a nice one. dont forget this about java: its more afraid of you than you are of it. :)
Thanks, you saved me :P
THANK YOU SO MUCH
@@dolpheru2986 yw
Danke Bro, ohne dich wäre ich aufgeschmissen
@@bosniaketyp2021 fühl ich
You a great way of explaining and teaching
Thanks for your efforts
If you are trying to add images in intelliJ Idea
right click on your project and add a new directory named as res
right click on res and then go to mark directory as resources
it will fix the issue
jeesus, it's insane how fast your channel grew from when I came in and you had less than 500 subs, huuuge respect man, and as always, indreadible content + explanation, please keep it up!!!
hey bro so i just watched your 12 hour java video,
you really helped me a lot thank you!
also,
could u make more project videos so we can practice what we've learned?
Yo broo!
I searched and searched for a biggener friendly javafx course
Yours is totally biggener friendly ,informative ,helpful, useful +(doesn't make me sleepy)
Can't thank u enough may Allah give u happiness and good health
Awsome video
No wonder why you have 0 dislikes truly Amazing !
i think the information you explain to me are too easy to understand. Thank you for your lesson, wish you a nice day bro!
Yooo, finished the main Java tutorial, thanks to you I'm finally thinking I can make the game I wanted to make :) You sir are a true hero!
Really cool brother. One of the best tutorials out there on JavaFX. Cheers mate.
Great
magnificent
Woooo 11th comment pwease pin
Thank you so much bro code, ive been wstxhing your java tutorials and landed a job at a near by website development job, im so excited akd it was all because of you. After java what language do you sugest learning?
Congrats on the job! thanks Fam, but it was you who put in the work to get there!
The language depends on the project. Mastering one language is the best, but if you work with web dev, Javascript wouldn't be a bad 2nd language.
gooey sandwich my favourite
Shoutout to My bro , i thought i was hopless and cooding was really boring until i came a cross your channel 😁
I'm learning JavaFX for a final paper, thank you so much!
you are literally a gigachad thanks brooo ❤❤
Thanks Bro, I'm glad you're back with some new stuff!
great
great work, thank you Bro! I've finished watching your 12-hour long Java tutorial, and now it's time for JavaFX, yeah!
nice videos
Nice
Let's gooooo !!
super video
nice
I tried it. It works well and good.
The best teacher ever
w00t w00t! Great tutorial, thanks :)
gud gud
good. thanks, it helps me a lot.
Amazing Video,Thanks
Please Continue Making Videos
♥️♥️♥️
Leaving a comment because you're badass
gerat video as usual
This lesson is really cooler than the video in my native language
purrfect
Awesome Bro!
what a fantastic explanation
Noice
Excellent tutorial thanks for sharing, greetings from Mexico.
Solid tutorial! Keep up the great work!
❤️❤️
Thankful
keeeeeb going man I Like your explaning so muck
Useful 👌👍
Great works 👏🏻👏🏻👏🏻
very useful content, thank you so much
Best tutorials out there, thanks bro!
gg
Muito obrigado
❤️
Amazing Video!
Bruh,
Just Fall in Love with Bro Code.
5 months ago, and there is still no dislikes... Amazing :D
great tutorial !
Superb brooo keep it up
Great !
Hey Bro, can you please do a video on java streams (mapping, filtering etc.),
you are awesome bro... please give us more javafx videos ...
Commenting for the algorithm 🙏
YOU ARE AMAZING MAN
Agradezco haber encontrado este video!!
congratulations Bro, congratulations .. in fact, you tutorials help me enormously in learning to program, java in particular .. I don't know if it's poss, I would like you to do some javaFX tutorials with MYSQL database .. how to connect, retrieve data, view, modify etc...
please..
I didn't plan that far ahead yet, but those are good suggestions!
@@BroCodez okay i hope someday you will ..
Yeahh , I hope too. I m on the way of learning JAVA.
Nice!
Great vid bro! Even though english is my second language I understood completely your video. Your channel is such a blessing!
super video bro
love your videos
Great tutorial, thanks!
Love it! Thanks bro. Great work.
awesome broo!!!
Love your video
Broooo, damn!
thank you for everything .
Thank you so much
thnx bro, i rlly like ur vids. they r rlly helpful and i hope u will make more great content like this
Bro Code : you're going to love this
Me : yes i did!
Tks for all the info bro!
thanks BroChad
Hey Bro! Thanks for your videos, I'm learning a lot with them.
in case others are facing the same issue as me: just passing the file name to Image's constructor didn't work for me, passing "file:..." however did work (no errors), but the icon still didn't show. Image(getClass().getResourceAsStream("...")) fixed the issue for me, still don't know why tho
Good job bro 🙃
bro u r the best . u r excellent at giving tutorials. and please make a tutorial about grid pane ,stack pane , flow pane , adding text area and combobox .thanks
This is helping me a lot
Thank you, very nice video!
Thank you
please do a javafx game tutorial
Gracias bro 👍
god bless you , thank you
Bro this is so helpful bro
Another great video! Hey, I have a question. So, I saw your 4 hour video about Java GUI and now know how to create a small application. But, I don't know how to use MySQL Database to connect it to my Login and Register form. Would you please make a video about MySQL and how to use it with the Login Form? I would really appreciate it :)
i hope you make a lot of videos about javafx
Thank you!!!!