To test the APLU Turtle Library
jturtle-0.1.1.jar, try this example program:
import ch.aplu.turtle.*;
import java.awt.Color;
/**
*
* @author (Your Name)
* @version September 0, 2024
*/
public class MyPicture {
public static void main(String[] args) {
Turtle hexter = new Turtle(Color.GREEN);
hexter.setPos(100,-50);
for (int i=0; i< 6; i++) {
hexter.forward(100);
hexter.right(-60);
}
hexter.setPos(0,0);
hexter.setFillColor(Color.BLUE);
hexter.fill();
Turtle t = new Turtle(hexter);
t.setColor(Color.RED);
t.setPos(-200, 180);
t.hideTurtle().label( "by My name");
}
}