P5 code into Java + help in understanding (artwork)

I’m trying to work with that right now, but I can’t really figure it out. Unfortunately, I don’t really understand the connections between the individual code components at the moment.