diff --git a/DEV.2.1/TP/TP6-Dessin/Bonjour.class b/DEV.2.1/TP/TP6-Dessin/Bonjour.class new file mode 100644 index 0000000..12b031c Binary files /dev/null and b/DEV.2.1/TP/TP6-Dessin/Bonjour.class differ diff --git a/DEV.2.1/TP/TP6-Dessin/Bonjour.java b/DEV.2.1/TP/TP6-Dessin/Bonjour.java new file mode 100644 index 0000000..95425eb --- /dev/null +++ b/DEV.2.1/TP/TP6-Dessin/Bonjour.java @@ -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); + } +} \ No newline at end of file diff --git a/DEV.2.1/TP/TP6-Dessin/Formes.java b/DEV.2.1/TP/TP6-Dessin/Formes.java new file mode 100644 index 0000000..e69de29