Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+6 votes

what is the use of .setCoords()?

asked in CSC201 Spring 2021 by (8 points)

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 (580 points)
+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 (2.6k points)
+1 vote

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

answered by (8 points)