DEV/DEV2.1/TP7/Polygoneur.java

20 lines
377 B
Java
Raw Normal View History

2023-05-09 11:23:33 +02:00
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);
}
}