Keep in mind what Graphics.drawLine does.
You're trying to draw a point from i to i, and Math.sin(i) to Math.sin(i) so you're going to get something like a line due to the fact that your points aren't varying from x1 to x2 and y1 to y2.
Try g.drawLine(i,(int)Math.sin(i),i + 2,(int)Math.sin(i))));