This commit is contained in:
Haïssous Kayyissa 2022-04-26 10:42:13 +02:00
parent 13778f3ebd
commit e2bdb15d20

13
Etoile.java Normal file
View File

@ -0,0 +1,13 @@
import javax.swing.JComponent;
import java.awt.*;
public class Etoile extends JComponent {
@Override
protected void paintComponent(Graphics pinceau) {
Graphics etoile = pinceau.create();
int[] x={0,40,50,60,100,70,90,50,20,40};
int[] y={40,40,0,40,40,60,100,80,100,80};
etoile.setColor(Color.MAGENTA);
etoile.fillPolygon(x,y,10);
}
}