JFrame | Java Swing Tutorial for Beginners
In this Java Swing GUI Tutorial we are going to explore the Java Swing JFrame for beginners. I will show you how to create and configure a Java Swing JFrame using two methods; JFrame using Inheritance and JFrame using composition. You will also learn which one is generally preferred as a best practice. Finally, we will explore some of the most common methods of the Java Swing JFrame class.
Check out my KZread Channel for more videos:
/ javacodejunkie
Пікірлер: 40
Probably the best Swing tutorial I've ever seen. Thanks a lot man
The best swing tutorial ever!!!
Thank you so much for the detailed tutorial
I was looking for videos as detailed as these, thank you!
@JavaCodeJunkie
3 жыл бұрын
@Andy Segura - You are welcome! I am glad you find them useful!
best Swing tutorial I've ever seen. Thanks a lot
Here is the latest video in my Java Swing series. Like, comment and subscribe and, as always, take care and keep on coding!
Thanks for the refresher!
Excellent tutorial, thank you!
Thank you to this valuable content. Great.
Great content. You explain concepts very well.
@JavaCodeJunkie
2 жыл бұрын
@Anthony Grear - Thank you! I appreciate your kind words! 🙏 Cheers!
this composition method is so cool!
@JavaCodeJunkie
3 жыл бұрын
@Alex Op - It really is! This will be a big step in learning Java OOP when you get your head around the concept! Cheers!
Thank you for a very clear and concise explanation.
@JavaCodeJunkie
Жыл бұрын
@tay261 - You're welcome! Glad it helped! Cheers!
Thank you that's so helpful, your way of explaining is so good, your voice as well is calm and clear 👍.
@JavaCodeJunkie
2 жыл бұрын
@SamGazer - Thank you very much for the kind words! 🙏 I am happy that you found the videos helpful! Cheers!
@Sam-Gazer
2 жыл бұрын
@@JavaCodeJunkie Thank you for your concern and reply, keep up the hard work !
Great tutorial! I was wondering about what you said at 8:16, that we shouldn't expose the methods to the 'outside world.' Why is this a bad thing?
Great content. Thank you..
@JavaCodeJunkie
2 жыл бұрын
@Kavishka Madhudhan - Thank you for the kind words! Glad you liked it!
Good word dear..
nice one. thanks
@JavaCodeJunkie
3 жыл бұрын
Thank you! Appreciate the encouragement! Cheers!
Thanks you love from india❤️❤️❤️❤️❤️
@JavaCodeJunkie
2 жыл бұрын
@ROYAL'S GAMING - You are very welcome! (from Canada) 🙏
This is so cool.
@JavaCodeJunkie
3 жыл бұрын
@Jeffrey Johnson - Swing or composition vs inheritance?
@jefferyjohnson2612
3 жыл бұрын
@@JavaCodeJunkie If you say that the composition method is best practice, then that is where I would focus long term for sure. To be entirely honest though, at this point (nooby), I don't really know or understand why it is the best practice method.
@JavaCodeJunkie
3 жыл бұрын
@Jeffrey Johnson - It is more a general rule of thumb that you should favour composition over inheritance. In the majority of cases, especially when it comes to UI widgets, there is no good reason to extend a class (inheritance) unless you are adding additional functionality. By using composition, you can accomplish the same thing without exposing a plethora of methods as part of your public API.
I think I'm lost on how you made the initialize method private, the third video doesn't mention it, do you have the source code?
nice video
@JavaCodeJunkie
2 жыл бұрын
@Fatih Özev - Thanks for the visit! Cheers!
10:21 Why "this.frame."? Why not just "frame"? The initialize() function is tied to the JFrameTwo object, and thusly you don't need to declare which object "frame" belongs to. You set the frame to "new JFrame" in the first line of the function too. Isn't "this." completely unnecessary?
@JavaCodeJunkie
2 жыл бұрын
@Random Commentor - Strictly speaking, in this instance, the keyword this is not necessary. The most common use of the this keyword is to eliminate the confusion between class attributes and parameters with the same name. Cheers!
You sound like Technoblade.
Bro say EA sports 😭
@JavaCodeJunkie
2 жыл бұрын
EA Sports???
@DigitalSurfz
2 жыл бұрын
@@JavaCodeJunkie EA sports it's in the game