This commit is contained in:
Emmanuel Srivastava
2025-03-17 17:11:48 +01:00
6 changed files with 56 additions and 11 deletions

View File

@@ -3,14 +3,10 @@ import java.awt.*;
public class Declinaisons extends JComponent {
private Color cyan = Color.CYAN;
private Color pink = Color.PINK;
private Color magenta = Color.MAGENTA;
private Color yellow = Color.YELLOW;
private Color blue = Color.BLUE;
public Declinaisons() {
super();
public Declinaisons(String form, String fond) {
if(inst % 2 == 0) {
secondPinceau.setColor("")
}
}
@Override
@@ -21,10 +17,19 @@ public class Declinaisons extends JComponent {
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
secondPinceau.setColor(this.getForeground());
for(int i=0; i<10; i++){
if(this.num % 2 == 0){
this.num ++;
secondPinceau.setColor(Color.MAGENTA);
} else {
secondPinceau.setColor(Color.CYAN);
}
}
int[] Xpoints = {this.getWidth()/4, this.getWidth()/4*3, this.getWidth()/2};
int[] Ypoints = {this.getHeight()/2, this.getHeight()/4, this.getHeight()/4*3};
secondPinceau.fillPolygon(Xpoints, Ypoints, 3);