Java Programming - 23 - Graphics/Shapes

preview_player
Показать описание
Hello guys, got another video up for you, and this time we're getting into some pretty interesting stuff. In the video I show you how to create and draw ellipses, lines and points while changing the color they are drawn in.
Рекомендации по теме
Комментарии
Автор

I don't know why you should import many different shapes. There is such class that you can add only one, all the shape will be in there for you, so you don't have to import again and again. 

keote
Автор

I guess you already know this but the whole ellipse thing can be done with --> g2.fillOval(100, 100, 50, 20);

Great tutorial though !

vincentbeaudoin
Автор

The video doesnt cover how to add freaking images

marksturtevant
Автор

Wtf he is doing, you don't need to create new object per new graphic figure... Also there is no need of new class to use draw method... All what you need:

public static void main(String[] args) {
Paint pav = new Paint() } // object for all the drawings in JFrame

public void paint(Graphics g) //only one method for all the drawings in JFrame
g.drawRect(300, 350, 200, 200);

jorismedeisis