This commit is contained in:
Emmanuel Srivastava
2025-02-10 14:28:58 +01:00
parent ed70c94d12
commit 9873cc7d90
3 changed files with 22 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,22 @@
import javax.swing.JComponent;
import java.awt.*;
public class Bonjour extends JComponent {
private Image pingouin;
public Bonjour() {
super();
this.pingouin = Toolkit.getDefaultToolkit().getImage("walk-0.png");
}
@Override
protected 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.pingouin, 10, 20, this);
}
}

View File