how_to_install_the_library_in_bluej
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to_install_the_library_in_bluej [2019/08/16 20:15] – frchris | how_to_install_the_library_in_bluej [2024/09/10 09:04] (current) – frchris | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Installing | + | ====== Installing |
- | - Make a New Project | + | - Make a New Project |
- | - Under '' | + | - Select |
- Click the '' | - Click the '' | ||
- | - Press the '' | + | - Press the '' |
- | - Select the '' | + | - Select the '' |
- It will tell you to restart the Virtual Machine, press the '' | - It will tell you to restart the Virtual Machine, press the '' | ||
- | - Under the '' | + | - Under the '' |
- | - Make a new class '' | + | - To test the APLU Turtle Library {{ :: |
- | <code java> | + | 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, | ||
+ | |||
+ | |||
+ | for (int i=0; i< 6; i++) { | ||
+ | hexter.forward(100); | ||
+ | hexter.right(-60); | ||
+ | } | ||
+ | hexter.setPos(0, | ||
+ | hexter.setFillColor(Color.BLUE); | ||
+ | hexter.fill(); | ||
+ | |||
+ | Turtle t = new Turtle(hexter); | ||
+ | t.setColor(Color.RED); | ||
+ | t.setPos(-200, | ||
+ | t.hideTurtle().label( "by My name" | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | </ | ||
+ | - To test our the '' | ||
import kareltherobot.*; | import kareltherobot.*; | ||
public class RobotRunner implements Directions | public class RobotRunner implements Directions | ||
Line 19: | Line 51: | ||
} | } | ||
} | } | ||
- | </ | + | </ |
how_to_install_the_library_in_bluej.1566000917.txt.gz · Last modified: 2019/08/16 20:15 by frchris