That sounds like the solution. Glad you got it working.
Type: Posts; User: Norm
That sounds like the solution. Glad you got it working.
If you want all the lines to start at the point at the location x=width and y=height, why is the code changing the values of width and height?
They shouldn't be changed if you want all the lines to...
There are no negative values:
Java has the top side be at y=0 and the left side be x=0. The y values increase going down and the x values increase going to the right.
To see what the coordinates are for any of the corners of a rectangle, draw a rectangle on a piece of paper and label each of the corners with their coordinates.
Java has the top side be at y=0...
Strange that you think the x,y values for the lower right corner is 0,0.
That looks like the coordinates for the upper left corner.
Something is wrong with the formatting of the code in the post.
Can you answer this simple question:
What are the x,y values for the bottom right corner?
How can you tell that?
Something is wrong with the code that is posted. It has lost all of its formatting.
You didn't answer this question:
What are the x,y values for the bottom right corner?
What are the x,y values for the bottom right corner?
The posted code is completely unreadable the way it is posted.
When posting code Please wrap your code with code tags:
YOUR CODE HERE
...
Post the statements that you are using to draw the lines.
What args to the draw method specify the starting point and what specify the ending point for the line?
What are the values that you get and what are the values that you expect?
What is this d you keep talking about?
Please use standard English when posting questions so that everyone will be able to understand them.