diff --git a/APL2.1/TP6/Sautoir/Paintformes.class b/APL2.1/TP6/Sautoir/Paintformes.class new file mode 100644 index 0000000..d237f80 Binary files /dev/null and b/APL2.1/TP6/Sautoir/Paintformes.class differ diff --git a/APL2.1/TP6/Sautoir/PaintFormes.java b/APL2.1/TP6/Sautoir/Paintformes.java similarity index 100% rename from APL2.1/TP6/Sautoir/PaintFormes.java rename to APL2.1/TP6/Sautoir/Paintformes.java diff --git a/APL2.1/TP6/Sautoir/Paintsablier.class b/APL2.1/TP6/Sautoir/Paintsablier.class new file mode 100644 index 0000000..fd1ff0c Binary files /dev/null and b/APL2.1/TP6/Sautoir/Paintsablier.class differ diff --git a/APL2.1/TP6/Sautoir/Paintsablier.java b/APL2.1/TP6/Sautoir/Paintsablier.java index b5b3c17..f58895a 100644 --- a/APL2.1/TP6/Sautoir/Paintsablier.java +++ b/APL2.1/TP6/Sautoir/Paintsablier.java @@ -14,8 +14,8 @@ public class Paintsablier extends JComponent { secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight()); } secondPinceau.setColor(Color.CYAN); - for (int i=0; i<(this.getWidth()/50); i++) { - for (int j=0; j<(this.getHeight()/50); j++) { + for (int i=0; i<5; i++) { + for (int j=0; j<5; j++) { secondPinceau.fillPolygon(new int[] {25+i*50,50+i*50,25+i*50,0+i*50},new int[] {-25+j*50,0+j*50,25+j*50,0+j*50},4); } } diff --git a/APL2.1/TP6/Sautoir/Sablier.class b/APL2.1/TP6/Sautoir/Sablier.class new file mode 100644 index 0000000..63e2866 Binary files /dev/null and b/APL2.1/TP6/Sautoir/Sablier.class differ diff --git a/APL2.1/TP6/Sautoir/Sablier.java b/APL2.1/TP6/Sautoir/Sablier.java index 51682d3..49f9553 100644 --- a/APL2.1/TP6/Sautoir/Sablier.java +++ b/APL2.1/TP6/Sautoir/Sablier.java @@ -3,8 +3,9 @@ import java.awt.*; public class Sablier { public static void main(String[] args) { JFrame fenetre = new JFrame(); - fenetre.setSize(500, 500); + fenetre.setSize(260, 260); fenetre.setLocation(100, 100); + fenetre.setResizable(false); fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Paintsablier draw = new Paintsablier(); fenetre.add(draw, BorderLayout.CENTER);