package formegeo;
import javax.swing.JComponent;
import java.awt.*;
 
public class Tag extends JComponent {
  private Image cercle;
  public Tag() {
    super();
    this.cercle = Toolkit.getDefaultToolkit().getImage("formegeo/cercles.png");
  }
  @Override
  public void paintComponent(Graphics pinceau) {
    Graphics secondPinceau = pinceau.create();
    if (this.isOpaque()) {
      secondPinceau.setColor(this.getBackground());
      secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
    }
 
    secondPinceau.drawImage(this.cercle, 10, 20, this);
  }
}