User Tools

Site Tools


part_4-_java_mode

This is an old revision of the document!


Processing Tutorial

Part 4: Java Mode

In Java mode, you can develop complete Java programs with classes, methods, and most anything. However, you cannot develop stand-alone Java apps in Processing. All Processing sketches are essentially applets, governed by the Processing system class PApplet.

To write a sketch in Java Mode, start by writing a class that extends PApplet:

public class MyDemo extends PApplet
{ ...

Now that your program has its own class name, you can reference it from other programs, and you can re-use it in other applications.

Also, any Processing sketch can be made up of multiple files using tabs. A new tab is created by clicking the right-arrow button on the right hand side of the tab bar (the bar which contains your sketch's name).

[This removes some of Processing's limitations - you can now use Processing utilities without being constrained to one of Processing's PApplet windows. This means that you can write a program that uses one of Processing's windows as an embedded object, etc.]


Prev: Part 3- Continuous Mode | Next: Part 5- Running Programs

part_4-_java_mode.1189462559.txt.gz · Last modified: 2007/09/10 17:15 by scarl