package formegeo;
import javax.swing.JComponent;
import java.awt.Graphics;
import java.awt.Color;
 
public class Texte extends JComponent {
  @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.setColor(Color.MAGENTA);
    secondPinceau.drawString(">o<", 10, 10);
  }
}