update
This commit is contained in:
26
DEV.2.1/test/test.1/PaintFenetre.java
Normal file
26
DEV.2.1/test/test.1/PaintFenetre.java
Normal file
@@ -0,0 +1,26 @@
|
||||
import.javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class PaintFenetre extends JPanel {
|
||||
|
||||
private Image MenuDebut;
|
||||
public PaintFenetre() {
|
||||
super();
|
||||
this.MenuDebut = Toolkit.getDefaultToolkit().getImage("../image/MenuDebut.jpg");
|
||||
}
|
||||
|
||||
|
||||
@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.clearRect(0, 0, this.getWidth(), this.getHeight());
|
||||
secondPinceau.drawImage(this.Menu, this.getWidth(), this.getHeight(), this);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user