Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+7 votes

what is the use of .setCoords()?

asked in CSC201 Spring 2021 by (1 point)

3 Answers

+3 votes

I use the set coords to create something like a grid. So when you want to specify how you want the four sides of the window to be. So you would do setCoords(0,1,1,0) for example to mean the width to be from 0 - 1 and height from 0-1.
Hope that helps,

answered by (1 point)
+1 vote

Take a look at Section 4.6 in the textbook! This could be VERY useful for some of your nifty projects.

(However, using custom coordinates for the GraphWin windows won't be on Monday's exam...)

answered by (3.5k points)
+1 vote

I believe its for setting the coordinates of your window to what you want instead of pixel coordinates.

answered by (1 point)
...