2022-04-26 10:42:13 +02:00
|
|
|
import javax.swing.JComponent;
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class Etoile extends JComponent {
|
|
|
|
@Override
|
|
|
|
protected void paintComponent(Graphics pinceau) {
|
|
|
|
Graphics etoile = pinceau.create();
|
2022-04-26 12:15:13 +02:00
|
|
|
int[] x={0,35,50,65,100,70,90,50,20,35};
|
2022-04-26 10:42:13 +02:00
|
|
|
int[] y={40,40,0,40,40,60,100,80,100,80};
|
|
|
|
etoile.setColor(Color.MAGENTA);
|
|
|
|
etoile.fillPolygon(x,y,10);
|
|
|
|
}
|
|
|
|
}
|