DEV/DEV2.1/TP5/Attente.java

25 lines
854 B
Java
Raw Permalink Normal View History

2023-04-26 11:00:04 +02:00
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Attente extends JComponent implements WindowListener {
@Override
protected void paintComponent(Graphics pinceau) {
Graphics secondPinceau = pinceau.create();
if (this.isOpaque()) {
secondPinceau.setColor(Color.GREEN);
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
}
void windowActivated(WindowEvent evenement) // premier plan
{
}
void windowClosed(WindowEvent evenement); // après fermeture
void windowClosing(WindowEvent evenement); // avant fermeture
void windowDeactivated(WindowEvent evenement); // arrière-plan
void windowDeiconified(WindowEvent evenement); // restauration
void windowIconified(WindowEvent evenement); // minimisation
void windowOpened(WindowEvent evenement);
}