i did find some web and try ... but still can't nid some help wif it ~.... using drawLine
import java.awt.*;
public class MyTriangle implements Myshape
{
protected int height;
protected int width;
protected Color color;
public MyTriangle(int width, int height, Color color)
{
this.height = height;
this.width= width;
this.color= color;
}
public void drawMe(Graphics g, Point location)
{
g.setColor(color);
g.drawLine((int) location.getX(), (int) location.getY(), width, height);
}
}

New Topic/Question
Reply




MultiQuote



|