2023-10-12 16:39:49 +02:00
|
|
|
import javax.swing.JComponent;
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class Q5Polygon extends JComponent {
|
|
|
|
public Polygon etoile;
|
|
|
|
|
|
|
|
public Q5Polygon(Polygon etoile){
|
|
|
|
this.etoile = etoile;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void paintComponent(Graphics pinceau) {
|
|
|
|
pinceau.setColor(Color.BLUE);
|
2023-10-23 13:07:05 +02:00
|
|
|
pinceau.drawPolygon(this.etoile);
|
2023-10-12 16:39:49 +02:00
|
|
|
}
|
|
|
|
}
|