hi Friends,
I need to draw some triangles in sequence in an applet.I have drawn two triangles to start with,the code for which is:
public class triangle extends Applet {
public void paint (Graphics g)
{
g.drawLine(50,50,25,100);
g.drawLine(25,100,75,100);
g.drawLine(50,50,75,100);
g.drawLine(100,50,125,100);
g.drawLine(75,100,100,50);
g.drawLine(75,100,125,100);
}
}
But,I dont think this is the right way .. can you please tell me how can i use a method where I can send the 3 points and it returns me with a triangle and in the end i merge all those triangles.Please help me guys.
Thanks
Mick