Draw Triangle in Java Applet

import java.applet.*;
import java.awt.*;
public class Triangle extends Applet
{
public void paint(Graphics g1)
{
g1.drawLine(180,150,180,370);
g1.drawLine(180,150,440,370);
g1.drawLine(180,370,440,370);
}
}




Output:
Draw Triangle in Java Applet