DEV/DEV2.1/TP7/Polygoneur.java
Simon Saye Babu f922df24d7 TP I/O
2023-05-09 11:23:33 +02:00

20 lines
377 B
Java

import javax.swing.*;
import java.awt.*;
import java.io.*;
public class Polygoneur extends JPanel
{
@Override
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
}
public Polygoneur(int[] xp,int[] yp)
{
g.setColor(Color.BLUE); // Couleur de remplissage
g.fillPolygon(xp, yp, xp.length);
}
}