2025-03-17 14:53:58 +01:00
|
|
|
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);
|
2025-09-30 09:43:41 +02:00
|
|
|
|
|
|
|
JPanel[] panneaux = {new JPanel(), new JPanel(), new JPanel(), new JPanel()};
|
|
|
|
Color[] couleursTriangles = {Color.MAGENTA, Color.YELLOW, Color.CYAN, Color.BLUE};
|
|
|
|
Color[] couleursFonds = {Color.CYAN, Color.PINK, Color.MAGENTA, Color.YELLOW};
|
|
|
|
for (int i = 0; i != 4; i++) {
|
|
|
|
panneaux[i].setBackground(couleursFonds[i]);
|
|
|
|
panneaux[i].setLayout(new BorderLayout());
|
|
|
|
panneaux[i].add(new Declinaisons(couleursTriangles[i]), BorderLayout.CENTER);
|
|
|
|
fenetre.add(panneaux[i]);
|
|
|
|
}
|
2025-03-17 14:53:58 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|