update
This commit is contained in:
Binary file not shown.
@@ -3,10 +3,11 @@ import java.awt.*;
|
||||
|
||||
public class Declinaisons extends JComponent {
|
||||
|
||||
public Declinaisons(String form, String fond) {
|
||||
if(inst % 2 == 0) {
|
||||
secondPinceau.setColor("")
|
||||
}
|
||||
private Color couleurTri;
|
||||
|
||||
public Declinaisons(Color couleurTri) {
|
||||
super();
|
||||
this.couleurTri = couleurTri;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Binary file not shown.
@@ -8,6 +8,16 @@ public class Fenetre extends JFrame {
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
this.setSize(500,500);
|
||||
this.setLocation(500,250);
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
Reference in New Issue
Block a user