A twenty yr old ”student” here, studies start in January. I first learned Html, css and js and now Java. I type fast, so I love the ”lengthy” style of Java and overall it seems really flexible and great! I am going to go through the entire Java Documentation, but first I thought I would learn Swing. Thanks to you!
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?
@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!
This makes a lot of sense, but there is just one thing that I don’t understand: why should you have to create separate classes for different JFrames? Couldn’t I just write a function that, based on its parameters, returns a new JFrame?
@@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.
@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.
A twenty yr old ”student” here, studies start in January. I first learned Html, css and js and now Java. I type fast, so I love the ”lengthy” style of Java and overall it seems really flexible and great! I am going to go through the entire Java Documentation, but first I thought I would learn Swing. Thanks to you!
Probably the best Swing tutorial I've ever seen. Thanks a lot man
I was looking for videos as detailed as these, thank you!
@Andy Segura - You are welcome! I am glad you find them useful!
The best swing tutorial ever!!!
Here is the latest video in my Java Swing series. Like, comment and subscribe and, as always, take care and keep on coding!
best Swing tutorial I've ever seen. Thanks a lot
Thank you that's so helpful, your way of explaining is so good, your voice as well is calm and clear 👍.
@SamGazer - Thank you very much for the kind words! 🙏 I am happy that you found the videos helpful! Cheers!
@@JavaCodeJunkie Thank you for your concern and reply, keep up the hard work !
Thank you for a very clear and concise explanation.
@tay261 - You're welcome! Glad it helped! Cheers!
Great content. You explain concepts very well.
@Anthony Grear - Thank you! I appreciate your kind words! 🙏 Cheers!
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?
this composition method is so cool!
@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 so much for the detailed tutorial
Excellent tutorial, thank you!
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?
@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!
Thank you to this valuable content. Great.
Thanks for the refresher!
Thanks you love from india❤️❤️❤️❤️❤️
@ROYAL'S GAMING - You are very welcome! (from Canada) 🙏
This makes a lot of sense, but there is just one thing that I don’t understand: why should you have to create separate classes for different JFrames? Couldn’t I just write a function that, based on its parameters, returns a new JFrame?
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?
Good word dear..
Great content. Thank you..
@Kavishka Madhudhan - Thank you for the kind words! Glad you liked it!
This is so cool.
@Jeffrey Johnson - Swing or composition vs inheritance?
@@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.
@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.
nice one. thanks
Thank you! Appreciate the encouragement! Cheers!
my wife left me and took everything... good video
nice video
@Fatih Özev - Thanks for the visit! Cheers!
Stanton Stravenue
Lewis Trafficway
Laurianne Circle
Bins Tunnel
Ullrich Green
Heathcote Causeway
Bailey Shoal
Marquardt Place
Maggio Course
You sound like Technoblade.
Hermiston Gateway
Abdiel Trafficway
VonRueden Harbors
Monahan Extension
Jessika Branch
Orn Parkways
Maurice Locks
McKenzie Ramp
Karelle Forks
Schamberger Common
Leopold Inlet
Sebastian Mountains
Abernathy Port
Emmanuel Springs
Levi Grove
Langosh Lodge
Christopher Ramp
Kendra Village
Jamal Mission
Anibal Gardens
Una Stravenue
Fabian Walk
Bro say EA sports 😭
EA Sports???
@@JavaCodeJunkie EA sports it's in the game
Gleichner Mews
Rebecca Lock
Boyer Walk
Violet Camp
Johnson Center
Cummerata Inlet
Salma Brook
Cummings Path
Malachi Mount
Veum Hollow
Aaliyah Mews
Klein Inlet