Make your own free website on

JLogo: Implementing Logo using Java.



DrawArea extends JLabel and implements our custom painting. We override the paintComponent() method of DrawArea so that our custom drawing is done when the JRE needs to draw our component. It has attributes turtle which tells the current state of turtle. The final(constant) values background and ink tell about the color with which we must paint foreground and background. It has methods relating to the various commands given to the Logo engine such as forward(), home(), penerase() etc.
public class DrawArea extends JLabel{
java.util.List l=new ArrayList();//lines to draw
Turtle t=new Turtle();
final Color background=Color.white;
final Color;
public void makeBlank(){
public void paintComponent(Graphics g){
public void forward(int moves){……
public void backward(int moves){……

to next chapter >>>