apl/APL2.1/TP6_Dessin/AccPanel.java
unknown d9949b5cb0 a
2022-01-14 06:54:18 +01:00

19 lines
542 B
Java

import java.lang.*;
public class AccPanel extends JPanel{
private Image menuAcc;
public AccPanel(){
super();
this.menuAcc = Toolkit.getDefaultToolkit().getImage("menuAcc.jpg");
}
@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.menuAcc,0,0, this);
}
}