I'm writing Applet which have to draw smooth connected lines, I'm doing it with this line (user is entering the pen's width)
public void mouseDragged(MouseEvent arg0)
{
g.setColor(kolor);
int width=Integer.parseInt(szPedzel.getText());
g.fillOval(arg0.getX(), arg0.getY(), width, width);
}
where g = this.getGraphics();
When I'm drawing kinda slow it is good, but when I'm doing it faster single ovals are displayed, is there any method which allows to cennect this ovals?
You will need to remember the previous mouse position and then draw the oval at every point between the old and new position....
...or see if the draw line functions can do what you need and do the same thing there.