Fomre triangle java
Résolu/Fermé
A voir également:
- Fomre triangle java
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux java itel football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Java décompiler - Télécharger - Langages
- Java runtime - Télécharger - Langages
2 réponses
Utilisateur anonyme
26 mai 2009 à 20:07
26 mai 2009 à 20:07
Salut,
Ici: https://docs.oracle.com/javase/6/docs/api/
et en sélectionnant la classe Graphics (fenêtre All Classes à gauche) tu trouveras la méthode:
drawPolygon
public abstract void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)Draws a closed polygon defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point.
This method draws the polygon defined by nPoint line segments, where the first nPoint - 1 line segments are line segments from (xPoints[i - 1], yPoints[i - 1]) to (xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
Cordialement,
Dan
Ici: https://docs.oracle.com/javase/6/docs/api/
et en sélectionnant la classe Graphics (fenêtre All Classes à gauche) tu trouveras la méthode:
drawPolygon
public abstract void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)Draws a closed polygon defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point.
This method draws the polygon defined by nPoint line segments, where the first nPoint - 1 line segments are line segments from (xPoints[i - 1], yPoints[i - 1]) to (xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
Cordialement,
Dan