Update DEV.2.1/TP/TP8-Evenements/2.Attente/Attente.java
This commit is contained in:
@@ -15,7 +15,6 @@ public class Attente extends JComponent implements WindowListener {
|
|||||||
secondPinceau.setColor(this.getForeground());
|
secondPinceau.setColor(this.getForeground());
|
||||||
|
|
||||||
if (enArrierePlan) {
|
if (enArrierePlan) {
|
||||||
// Dessine un sablier
|
|
||||||
secondPinceau.setColor(Color.BLACK);
|
secondPinceau.setColor(Color.BLACK);
|
||||||
int[] xHaut = {100, 150, 200};
|
int[] xHaut = {100, 150, 200};
|
||||||
int[] yHaut = {100, 150, 100};
|
int[] yHaut = {100, 150, 100};
|
||||||
@@ -24,7 +23,6 @@ public class Attente extends JComponent implements WindowListener {
|
|||||||
secondPinceau.fillPolygon(xHaut, yHaut, 3);
|
secondPinceau.fillPolygon(xHaut, yHaut, 3);
|
||||||
secondPinceau.fillPolygon(xBas, yBas, 3);
|
secondPinceau.fillPolygon(xBas, yBas, 3);
|
||||||
} else {
|
} else {
|
||||||
// Dessine un cercle magenta sur fond vert
|
|
||||||
secondPinceau.setColor(Color.GREEN);
|
secondPinceau.setColor(Color.GREEN);
|
||||||
secondPinceau.fillRect(0, 0, getWidth(), getHeight());
|
secondPinceau.fillRect(0, 0, getWidth(), getHeight());
|
||||||
secondPinceau.setColor(Color.MAGENTA);
|
secondPinceau.setColor(Color.MAGENTA);
|
||||||
@@ -46,7 +44,6 @@ public class Attente extends JComponent implements WindowListener {
|
|||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Méthodes inutilisées mais obligatoires à déclarer
|
|
||||||
@Override public void windowOpened(WindowEvent e) {}
|
@Override public void windowOpened(WindowEvent e) {}
|
||||||
@Override public void windowClosing(WindowEvent e) {}
|
@Override public void windowClosing(WindowEvent e) {}
|
||||||
@Override public void windowClosed(WindowEvent e) {}
|
@Override public void windowClosed(WindowEvent e) {}
|
||||||
|
Reference in New Issue
Block a user