erwan arrete de copier mon git
This commit is contained in:
parent
70c2cf6f54
commit
2c8304e303
BIN
APL2.1/TP6/Sautoir/Paintformes.class
Normal file
BIN
APL2.1/TP6/Sautoir/Paintformes.class
Normal file
Binary file not shown.
BIN
APL2.1/TP6/Sautoir/Paintsablier.class
Normal file
BIN
APL2.1/TP6/Sautoir/Paintsablier.class
Normal file
Binary file not shown.
@ -14,8 +14,8 @@ public class Paintsablier extends JComponent {
|
|||||||
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
|
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
|
||||||
}
|
}
|
||||||
secondPinceau.setColor(Color.CYAN);
|
secondPinceau.setColor(Color.CYAN);
|
||||||
for (int i=0; i<(this.getWidth()/50); i++) {
|
for (int i=0; i<5; i++) {
|
||||||
for (int j=0; j<(this.getHeight()/50); j++) {
|
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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
APL2.1/TP6/Sautoir/Sablier.class
Normal file
BIN
APL2.1/TP6/Sautoir/Sablier.class
Normal file
Binary file not shown.
@ -3,8 +3,9 @@ import java.awt.*;
|
|||||||
public class Sablier {
|
public class Sablier {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
JFrame fenetre = new JFrame();
|
JFrame fenetre = new JFrame();
|
||||||
fenetre.setSize(500, 500);
|
fenetre.setSize(260, 260);
|
||||||
fenetre.setLocation(100, 100);
|
fenetre.setLocation(100, 100);
|
||||||
|
fenetre.setResizable(false);
|
||||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
Paintsablier draw = new Paintsablier();
|
Paintsablier draw = new Paintsablier();
|
||||||
fenetre.add(draw, BorderLayout.CENTER);
|
fenetre.add(draw, BorderLayout.CENTER);
|
||||||
|
Loading…
Reference in New Issue
Block a user