update
This commit is contained in:
BIN
DEV.2.1/TP/TP6-Dessin/Bonjour.class
Normal file
BIN
DEV.2.1/TP/TP6-Dessin/Bonjour.class
Normal file
Binary file not shown.
22
DEV.2.1/TP/TP6-Dessin/Bonjour.java
Normal file
22
DEV.2.1/TP/TP6-Dessin/Bonjour.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
0
DEV.2.1/TP/TP6-Dessin/Formes.java
Normal file
0
DEV.2.1/TP/TP6-Dessin/Formes.java
Normal file
Reference in New Issue
Block a user