update
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Declinaisons.class
Normal file
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Declinaisons.class
Normal file
Binary file not shown.
32
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Declinaisons.java
Normal file
32
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Declinaisons.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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.setColor(this.getForeground());
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Fenetre.class
Normal file
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Fenetre.class
Normal file
Binary file not shown.
13
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Fenetre.java
Normal file
13
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Fenetre.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class Fenetre extends JFrame {
|
||||||
|
public Fenetre() {
|
||||||
|
super("Declinaisons");
|
||||||
|
|
||||||
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
this.setSize(500,500);
|
||||||
|
this.setLocation(500,250);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Main.class
Normal file
BIN
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Main.class
Normal file
Binary file not shown.
16
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Main.java
Normal file
16
DEV.2.1/CM-blanc/CM-1/3.Declinaisons/Main.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Fenetre fenetre = new Fenetre();
|
||||||
|
fenetre.setVisible(true);
|
||||||
|
|
||||||
|
GridLayout tabl = new GridLayout(2,2);
|
||||||
|
fenetre.setLayout(tabl);
|
||||||
|
|
||||||
|
for(int i = 0; i < 4; i++)
|
||||||
|
fenetre.add(new Declinaisons());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Reference in New Issue
Block a user