0% found this document useful (0 votes)
25 views

Java Applet

Java commands can draw both hollow and filled basic shapes like lines, ovals, polygons, and rectangles. They can also display strings and load images. Specific commands include drawLine(), drawOval(), drawPolygon(), drawRect(), drawString(), fillArc(), fillOval(), fillPolygon(), fillRect(), and setColour() for setting the drawing color. Images can be loaded using getImage() and drawn on the canvas with drawImage().

Uploaded by

argusacademy
Copyright
© © All Rights Reserved
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Java Applet

Java commands can draw both hollow and filled basic shapes like lines, ovals, polygons, and rectangles. They can also display strings and load images. Specific commands include drawLine(), drawOval(), drawPolygon(), drawRect(), drawString(), fillArc(), fillOval(), fillPolygon(), fillRect(), and setColour() for setting the drawing color. Images can be loaded using getImage() and drawn on the canvas with drawImage().

Uploaded by

argusacademy
Copyright
© © All Rights Reserved
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 15

JAVA

by

ArguS academy

COMMAND FOR GRAPHICS PROGRAMMING


drawLine()=draws straight line

drawOval()= draw a hollow oval


drawPolygon()=draw hollow polygon

drawRect()=draw hollow rectangle


drawString()=display string

COMMAND FOR GRAPHICS PROGRAMMING

fillArc()=draw a filled arc


fillOval()=draw a filled oval
fillPolygon()=draw a filled polygon
fillRect()=draw a filled rectangle

setColour()= set the drawing color


for loading image: Image img = getImage(getDocumentBase(), "x.gif");
g.drawImage(img, 0, 0, this);

You might also like