I am new to Processing, but really enjoying it. I am coding in Java (Intellij IDEA) using the PApplet ProcessingCore as a library. I am building an interactive model that will simulate and display switching events on a high voltage power grid. I have the program working beautifully so far. My power grid is behaving the way I want. Now I’m trying to add GUI with buttons and menus, etc. I read up on ControlP5 and it seems like what I need for my project, but I am having a hard time getting IntelliJ to recognize the ControlP5 library. I have downloaded the ControlP5 package and referenced it as a library. My code seems to recognize the import statement, because it is greyed out as an unused import. However, the code will not recognize my variable declaration (final line in code below):
import processing.core.PApplet;
import processing.core.PConstants;
import processing.event.*;
import controlP5.*;
public class Main extends PApplet {
Viewport viewport = new Viewport();
Click click = new Click();
UserInterface ui = new UserInterface();
ControlP5 cp5;
Below are three screenshots from my project. (Apologies… Forum will only allow me to upload one image since I’m a new user.) First is a screenshot of my libraries. You can see I have a ProcessingCore library (working fine) and the ControlP5 library.
Second is a screenshot of my module dependencies.
Third is a screenshot of my project tree. I can see the ProcessingCore library is referenced but I do not see the ControlP5 library.
I have tried several different combinations of loading the library from some of the sub-folders which contain only Java class files. I have also read the ControlP5 installation instructions several times (not very helpful to me). Need help! What am I missing? Thank you in advance!