Launch Create setup() draw() Run Extras |
Configure JRE | 1. Modify workspace for all projects. |
AT HOME | Step 0: Getting Started.(you may skip if working on our CS lab machines) |
Launch | Step 1: Create a new workspace and add core.jar to Java Project. |
Config | Step 2: Make MovingRectangle a Processing Applet |
draw() | Step 3a: Override (redefine) the draw() method |
setup() | Step 3b: Override the setup() method |
Execute | Step 4: Life cycle of a PApplet . |
Extras | Step 5: Extras |
This step will show you how to modify your Eclipse workspace so that all new projects can use the processing classes without having to manually import core.jar and add it do the build path. Do this if you plan to write many Prossing programs so that you don't have to manually add the core.jar library each time.
Add core.jar (an external jar file) to the default JRE:
To edit the default JRE:
- File -> New -> Java Project to open project wizard.
- Select Configure JREs to enter configuration dialog.
- Select the JRE you wish to edit
- Click Edit
- Click Add External JARs
- navigate to s:\processing-2.2.1\amd64_rhel7\core\library\
- Select core.jar file.
- Click Open
- Click Finish
- Click OK
- Continue with the current project you wish to create or Cancel the current project (for now).
Now, any new projects created will be able to use classes from the processing.core package.
To display text strings on your applet, use the fill() command to set the color of the text and the text() command to set the text to display anbd where to display the text. For example:
fill( 0 ); text( "Hello World!" , 5, 10 ); // display text near upper left corner
Create an instance of color borderColor = color(255,127,0);
and use the named color in other commands like stroke() and fill().
fill(153, 102, 0);
text("13", 10, 30);
Launch Create setup() draw() Run Extras
2015 Deb Deppeler