He has no business exerting this much effort into his videos and yet time and time again has proven to be a great teacher. You sir are a blessing to not only this community but the world as a whole. More educators should be like you. Keep up God's work Choobtorials.
@choobtorials Жыл бұрын
Thank you so much!!!
@CrasyWolfang2 жыл бұрын
This is the best coding tutorial I've ever seen. Next to zero clutter, very clear demos, and very relevant info. I don't even mind the slow pace. I'll definitely revisit this channel for more tutorials.
@osternosousaАй бұрын
Very good indeed. I love it.
@michaellarkins61403 жыл бұрын
Wish I had a teacher like you. Your students are so lucky. Thanks for sharing ur java lessons. Your teaching style and coding style is need and easy to understand. Love ur visuals. I would pay for more java courses.
@choobtorials3 жыл бұрын
Thank you for the kind words! We've been fully online at our university for the last year and it has been really exhausting. So hearing someone say this helps remind me that the effort is all worth it.
@osternosousaАй бұрын
Wish this class had 12 hours.
@OldSchoolBoBo3 жыл бұрын
duuude, 6 mins in and you already clarified several questions which went through my head. Thats some quality teaching here.
@choobtorials3 жыл бұрын
Hey, thanks for the comment! Glad I could help!
@choobtorials3 жыл бұрын
JAVA GRAPHICS PROGRAMMING Timestamps: 00:00 Introduction 00:42 Creating a class that extends JComponent 02:11 Overriding the paintComponent method 02:28 What is the Graphics object for? 03:21 How to convert / cast the Graphics object into a Graphics2D object 04:23 The java.awt.geom package 04:58 How to create a rectangle using the Rectangle2D.Double class 05:26 How does the JComponent coordinate space work? Where is x=0 and y=0? 06:33 How to choose a color for drawing or filling shapes in Java 06:47 The RGB Channels 07:06 Java Color Constants 07:19 How to fill the shape with the chosen color 07:32 How to view the drawing / graphics 08:10 How to add a solid-colored background to a JFrame 09:41 How to create a circle using the Ellipse2D.Double class 10:04 How to set a new color 10:21 How to create a line using the Line2D.Double class 10:46 How to draw the line using the draw method 10:59 The graphics stacking order 11:39 Antialiasing 12:04 How to create a RenderingHints object to apply antialiasing 12:42 The setRenderingHints method 13:05 Decluttering the paintComponent method 13:33 How to draw a cloud using ellipses 14:35 Creating the Cloud class 15:12 Using the Cloud class to create and draw a cloud 16:30 Visualizing the connection between the DrawingCanvas class and the Cloud class 17:19 Making the clouds customizable 21:36 A note on the Override annotation 21:56 Next Topics: Paths, Curves, and Transformations 22:43 How to create a path using the Path2D.Double class 23:24 What is the difference between the moveTo and lineTo methods? 24:37 How to close a path using the closePath method 25:07 How to create curved segments using the curveTo method 25:40 What are Bézier handles? 27:35 Heart-shaped path 28:02 What is graphics translation? 28:35 How to apply graphics translation in Java 29:29 Visualizing how graphics translation works 30:43 Applying additional translations 31:44 How to reset the translation (Method 1 - Hardcoding reset values) 33:29 How to reset the translation (Method 1 - Using an AffineTransform object) 33:36 What is an AffineTransform object? 37:04 Why use translate? 37:33 How to rotate shapes using the rotate method 38:08 How to use the Math.toRadians method to convert degrees to radians 38:45 Rotation pivot points explained 39:42 How to change the pivot point when rotating shapes in Java 40:28 The effect of calling the rotate method multiple times 41:52 How to reset the rotation using an AffineTransform object 42:46 Thanks for watching!
@ArKa_473 жыл бұрын
I want to call this a high quality tutorial :) The overlayed graphics which show quiete instantly what would happens are great. kind regards
@rorymax2 жыл бұрын
15:00 I’m pretty sure you can combine Shapes into an Area object and render that. You then also have the ability to check if a point lies within your hybrid shape, etc
@perelium-x Жыл бұрын
Your channel is so so underrated, keep up the good work man! You've been a great help
@DiegoIbarra-d3h2 ай бұрын
Thank you so much for this video, it helped out a lot! I hope you consider uploading more java graphics tutorials in the near future.
@JuliaNeubauer3 жыл бұрын
Super difficult material that you’ve made graphically understandable. Thank you for your excellent presentation.
@rede_neural2 жыл бұрын
Such an underrated channel
@GODWYNIDRISLOZADA-o1w2 ай бұрын
Good morning po, Sir Choob, Godwyn here. For radians, I find it helpful na if one expresses the radian value as "double /MATH.PI". That way, it saves us from having to compute in our heads and focus on the code structure.
@gracekaranja39102 жыл бұрын
Finally got to understand graphics, best tutorial ever!
@TuanNguyen-ie2zm2 жыл бұрын
20:02 your pronunciation & accent is so professional, glad to see this video, thank you very much!
@choobtorials2 жыл бұрын
Thank you! Glad you enjoyed the video!
@kasper32463 ай бұрын
Extremely high quality video. Thank you so much :)
@aksHandler Жыл бұрын
Very smoothly explained. Wonderful.
@codehorror80762 жыл бұрын
Wow, subbed! This was one of the best videos I've seen this year.
@choobtorials2 жыл бұрын
Thank you!!!
@lingyuanyan1722 Жыл бұрын
Thank you for this awesome video. Drawing in Java is something that is very confusing for me and particularly other noobs, as it is a large leap in skill gap, but this tutorial was a great help to me and the best tutorial yet addressing this topic. thank you sincerely, I will definitely revisit this video and other of your tutorials in the future.
@MrSemIsAwesome2 жыл бұрын
Seriously: Thank you so much for this awesome tutorial. This is excellent and you should be proud of yourself.
@choobtorials2 жыл бұрын
Thanks for the kind words! Appreciate it!
@thecodingcanuck81853 жыл бұрын
Fantastic video! Great dynamic visuals and your explanations were extremely comprehensive and easy to understand.
@Ragnak_3 жыл бұрын
The fact I could understand everything you said impresses me. This was such a nice and well explained video on Graphics for java and I have more confidence now to dabble in it.
@AAsad-3786 Жыл бұрын
This was the best video tutorial I have come across, straightforward and to the point. I was hoping you would show how to rotate the composite shape of heart in your tutorial or another video. It will be greatly appreciated.
@by_danali3 жыл бұрын
very informative! love this video. thanks choobtorials!
@rahulnair77143 жыл бұрын
What an excellent tutorial, simply brilliant! Thank you very much.
@choobtorials3 жыл бұрын
Thank you for the comment! Really appreciate it! Glad you liked the tutorial!
@danwest99003 жыл бұрын
Superlative quality tutorial video! Thank you for posting!!!
@choobtorials3 жыл бұрын
Glad you liked it! Thanks for leaving a comment! Please share the link with others. Would really appreciate it!
@oguzhantopaloglu94423 жыл бұрын
Extremely informative and well explained!
@choobtorials3 жыл бұрын
Thank you! Appreciate the comment. Thanks for watching.
@choobtorials2 жыл бұрын
Can’t really say with just that info. There could be any number of things that are wrong . I suggest just going through the lines very carefully. There might be a typographical error or maybe a missing line somewhere.
@BaiLanRenSheng3 жыл бұрын
A very underrated channel
@choobtorials3 жыл бұрын
Thanks! Appreciate what you said. I’ll just keep making videos!
@urishpolansky39533 жыл бұрын
waiting for you next video
@SujithManchala3 жыл бұрын
Informative👍, thank you!
@Mraeth8n3 жыл бұрын
Wow such an awesome video! I've learned alot!
@choobtorials3 жыл бұрын
I’m glad you did! Thanks for watching!
@ThanhLe-ve1cj3 жыл бұрын
very easy to understand.
@tas92143 жыл бұрын
Copied the exact same code till around minute 7:32, but the blue rectangle isn't showing up. Only the window opens, and there's nothing on there. Help? Thank you ^^ Edit: using public void paint(Graphics g) instead of protected void paintComponent(Graphics g) worked. Why is that? Edit 2: Doing DrawingCanvas extends JPanel, then overriding the paintComponent method also works. I'm quite confused. Any help much appreciated.
@choobtorials3 жыл бұрын
Hmmm not sure. Can you try changing it to extend JComponent again just to double-check?
@tas92143 жыл бұрын
@@choobtorials It worked! Woah😆 Thanks!
@choobtorials3 жыл бұрын
Haha I think maybe it was a typo in the method signature. Could have been something as small as just a single character with the wrong casing. So instead of overriding the paintComponent method, Java thought you were making a new, completely different one. Glad it works now!
@microsoftgamerx854 Жыл бұрын
Amazing! . Can you make video on animination too
@brahimelhabzi50093 жыл бұрын
Thanks, it was exactly what I needed to know
@dapomeroy2 жыл бұрын
This is great, thank you!
@SublimeNotions2 жыл бұрын
How would I generate those clouds automatically in an array and have the array print? Such that every time I run the program I have a randomly generated field of clouds. Ive been stuck on something like this for a couple of days. In my case though I want to generate a hundred or more objects and I want them to be random each time.
@choobtorials2 жыл бұрын
You can use Math.random() to generate values for the x, y, and size of the clouds. And put it in a loop to make it repeat as many times as needed.
@otengsamuel51752 жыл бұрын
I am struggling with my assignment and its states that, I should rotate dollar sign ($) using the drawSting method in java and also let it translate in the in its own path, meaning as the dollar sign is rotating, it should translate on a dollar sign path. This has become a challenge for me and I need your help to making a video and tag me on it please.
@meowsifer9324 Жыл бұрын
ily sir choobs
@choobtorials Жыл бұрын
🥰🥰🥰
@rooveloft52732 жыл бұрын
7:55 the g2d.run() function isn't working for me :(
@choobtorials2 жыл бұрын
Can you check again? There’s no run method for the Graphics2D class mentioned in the video. And 7:55 is showing the DrawingTester class.
@rooveloft52732 жыл бұрын
@@choobtorials That was 8:40 sorry! It was g2d.fill() method! At line 19
@choobtorials2 жыл бұрын
Hmm could be a lot of things. Can’t really know without more details. But could be a missing line of code somewhere or a mistake in the values for the rectangle or maybe the colors. If you’re getting a compile error, then there might be a syntax error somewhere.
@rooveloft52732 жыл бұрын
@@choobtorials Ok, something was definitely wrong on my comp. I was learning so I wrote the exact code you did. I deleted the files and retyped the same code again, and now my computer decides that g2d.fill is now correct!😑 I am resuming your tutorial! Question: Can fillRect() method be used in place of fill()?
@mihirkulkarni53243 жыл бұрын
Does the JFrame have to be declared inside the Main function?
@choobtorials3 жыл бұрын
Generally speaking, no. It doesn’t have to be directly instantiated in the main method.
@fugeratube13342 жыл бұрын
great tutorial thanks bro
@idirdjouab7931 Жыл бұрын
Thank you !!
@mechanicraft-mc72033 жыл бұрын
Super helpful!
@hepno3 жыл бұрын
Thank you so much!
@choobtorials3 жыл бұрын
You’re welcome! Thanks for watching!
@luizinniziul29763 жыл бұрын
Que conteúdo magnifico 🤝
@854Rri Жыл бұрын
You save my life
@jbars24482 жыл бұрын
Thank you.
@andreleao.prodemge2 жыл бұрын
Olá, tudo bem? Alguém pode me ajudar em como faço pra usar o Graphics2D sem ser usando JFrame, JPanel ou Applets? Tipo, meu projeto é web, preciso que o desenho seja renderizado numa DIV. Alguém pode me ajudar? Já procurei em muitos sites e todos só falam de JFrame, JPanel, Applets...
@choobtorials2 жыл бұрын
Unfortunately, you can’t. Graphics2D belongs to the Java library. It is not part of JavaScript. If you want to draw directly on a div, you can use the canvas element along with JavaScript.
@byte_hubs3 жыл бұрын
how on the earth can it be free well-done
@choobtorials3 жыл бұрын
Haha thanks! If you could share it with others, I would greatly appreciate it.
@gabekramer3882 жыл бұрын
I followed all of your steps and mine still didnt show up in my JFrame
@choobtorials2 жыл бұрын
It most likely means that you have a typo somewhere. For example, the paintComponent method could have been misspelled. One small mistake, such as using the wrong letter casing, will make the program not work as expected.
@gabekramer3882 жыл бұрын
I thought figured that but I get no errors in the terminal so that's what is throwing me off....I was wondering if it was the version of Java maybe?
@choobtorials2 жыл бұрын
Not sure. Hard to say without more details. Does the JFrame come out at least? And if it does, it’s just blank?
@hkroot61833 жыл бұрын
❤❤❤❤
@dudedudedudedude53812 жыл бұрын
This is so underrated. just Why?
@choobtorials2 жыл бұрын
Duuuude. Waiting patiently for the day when the gods of the KZbin algorithm shower their blessings upon my humble channel.
@autopratama61522 жыл бұрын
please share source code?
@benkigera3 жыл бұрын
Man , i was giving up on graphics, my professor is so dumb to be honest .
@choobtorials3 жыл бұрын
Sorry to hear about your prof. Hope this video helped. And feel free to share the link with your classmates, too!
@cate01a3 жыл бұрын
I feel this is overly verbose, long, and could be simplified further