Source Code: Multiple monitors, applets, and frames from the same processing sketch

A few years ago, I had to do a project that involved two screens running from the same processing sketch. The resulting project was about two participants playing against each other on two separate touch screens, similar to battleship. Figuring out the architecture took some trial and error, so I hope the following code will help anyone interested in doing the same: