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:
To give you some idea:
public void paint(Graphics g) {
drawCoordinates(g);
}
private void drawCoordinates(Graphics g) {
// get width & height here (w,h)
// define grid width (dh, dv)
for (int x = 0; i < w; i += dh) {
g.drawLine(x, 0, x, h);
}
for (int y = 0; j < h; j += dv) {
g.drawLine(0, y, w, y);
}
}