Java-Lines

Lines The simplest shape we can draw with the Graphics class is a line. The drawLine( ) method takes two pair of coordinates, (x1, y1) and (x2, y2) as arguments and draws a line between them. Program Program Source¬† import java.applet.Applet; import java.awt.Graphics; public class Javaapp extends Applet { public void paint(Graphics g) { g.drawLine(10,10,100,10); … Read more…