Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import logotekenap.*;
- public class MainClass extends TekenApplet {
- public int vierkanten;
- public InvoerVariabele vierkantenInvoer;
- public void initialiseer() {
- resize(800, 400);
- vierkanten = 1;
- vierkantenInvoer = new InvoerVariabele("vierkanten", 0, 64, 1);
- maakZichtbaar(vierkantenInvoer);
- }
- public void tekenprogramma() {
- penUit();
- stap(-400, -10);
- penAan();
- for (int j=0;j<vierkanten;j++) {
- for (int i=0;i<4;i++) {
- vooruit(20);
- links(90);
- }
- penUit();
- stap(30, 0);
- penAan();
- }
- }
- public void invoerVarActie(InvoerVariabele iv) {
- vierkanten = vierkantenInvoer.geefWaarde();
- tekenOpnieuw();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement