In this article we will look at how to work with graphics in AWT. We will look at various AWT classes that help us with creating graphics in our applications. Graphics Class In GUI applications, we can use Graphics class of java.awt package to create various graphics like lines, rectangles, circles, polygons etc. Let’s look at some of the methods available in the Graphics class: void drawLine(int startX, startY, endX, endY) – Used to draw a line between twi points. void drawRect(int startX, int startY, int width, int height) – Used to draw a rectangle starting from the top left corner with
The post How to work with graphics in AWT appeared first on Coding Security.
How to work with graphics in AWT
read more
Tidak ada komentar:
Posting Komentar