Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Java polygons question?
Hi guys im simply wondering which value in either polygon array i.e. x - coordinates or y-coordinates deals with positioning the shape on the frame, i just wanna be able to place it right in the center of the panel.
An example of what i mean is below:
xCoordinates[] = {20, 20, 60} ;
yCoordinates[] = {90, 70, 30};
1 Answer
- 9 years agoFavorite Answer
Polygon(int[] xpoints, int[] ypoints, int npoints)
xpoints - an array of x coordinates
ypoints - an array of y coordinates
npoints - the total number of points in the Polygon
Source(s): http://docs.oracle.com/javase/1.4.2/docs/api/java/... int[], int)