I\'m wondering if there\'s a funciton in Java that can draw a line from the coordinates (x1, x2) to (y1, y2)?
What I want is to do something like this:
In your class you should have:
public void paint(Graphics g){ g.drawLine(x1, y1, x2, y2); }
Then in code if there is needed you will change x1, y1, x2, y2 and call repaint();.
repaint();