jar

5 replies [Last post]
Offline
Last seen: 12 weeks 2 days ago
Joined: 01/19/2011
Posts:

hi

is it possible to use jar files?

i upload the jar file (JTurtle.jar)
(its a turtle that draw lines)

see my code

after save/build
preview didnt give me the painting!

i hope you can help me

thx

Dj

sorry for the dutch words

-----

import java.awt.*;
import java.applet.*;

public class Project extends Applet
{
JTurtle turtle;

public void init()
{
turtle = new JTurtle( this );

}

public void paint(Graphics g)
{
turtle.init();
turtle.delayOn( 10 );
int aantalKeer = 0;
while( aantalKeer < 36 ) {
turtle.right( 10 );
tekenVeelhoek( 5, 70 );
aantalKeer++;
}

}

public void tekenVeelhoek( int aantalHoeken,
int zijde ) {
for( int i = 1; i <= aantalHoeken; i++ ) {
turtle.forward( zijde );
turtle.right( 360.0 / aantalHoeken );
}
}

}

tim.speed's picture
Offline
Last seen: 17 hours 36 min ago
Joined: 02/24/2010
Posts:
Is it possible the turtle is

Is it possible the turtle is painted outside the canvas boundaries?
If not I'm pretty sure its a flaw in our back-end, it just doesn't know where to find the jturtle jar, I will investigate this and fix it for the next version.

-----------------
Tim Speed
Compilr Developer and CTO

tim.speed's picture
Offline
Last seen: 17 hours 36 min ago
Joined: 02/24/2010
Posts:
This should now be fixed,

This should now be fixed, give it a try :)

-----------------
Tim Speed
Compilr Developer and CTO

Offline
Last seen: 12 weeks 2 days ago
Joined: 01/19/2011
Posts:
oke i give it a try :D

oke

i give it a try :D

Offline
Last seen: 12 weeks 2 days ago
Joined: 01/19/2011
Posts:
it works

hi tim

thx for the fix
it works great

tim.speed's picture
Offline
Last seen: 17 hours 36 min ago
Joined: 02/24/2010
Posts:
You are welcome, Glad it is

You are welcome, Glad it is working now :)

-----------------
Tim Speed
Compilr Developer and CTO