I am making a basic Java program and I would like to draw a line using basic swing Graphics.drawLine.
Is there a way to make the two points in terms of doubles so I
If you have a refernce to g, which I assume is Graphics object, you should use Java 2D APIs
g
Graphics
Graphics2D g2 = (Graphics2D) g; g2.draw(new Line2D.Double(x1, y1, x2, y2));
Javadocs for: