There are a number of code editors and IDEs for Processing (Integrated Development Environment) that offer more powerful tools, more comfortable interfaces and greater customisation of the workspace.
When you work for processing in IntelliJ, you are coding in a java environment and just making use of the processing core library and build processs.
import processing.core.*;
public class ExampleApplet extends PApplet {
public static void main(String args[]) {
PApplet.main("ExampleApplet");
}
@Override
public void settings() {
// TODO: Customize screen size and so on here
size(200, 200);
}
@Override
public void setup() {
// TODO: Your custom drawing and setup on applet start belongs here
clear();
}
@Override
public void draw() {
// TODO: Do your drawing for each frame here
clear();
fill(255);
rect(50, 50, 100, 100);
}
}
4. To run the example, got to →Run→Run 'ExampleApplet' or 'ctrl R'
5. To export a clickable java application, you will need to set up artefacts. Go to →File→Project Structure and then click on the Artefacts tab. Click the + icon and add a new JAR 'From modules with dependencies...'. In the next dialogue box, select ExampleApplet.java as the main class file and click ok.
6. Apply and exit the Project Structure screen. To export the application, go to →Build→Build Artefact. You will then find the Jar file in the newly created 'out/artefacts' folder.