SyntaxFix
Write A Post
Hire A Developer
Questions
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();