Hi everyone, I home someone here can point out what I am missing. I have written 2 processing applets that can control led cubes ( youtube ledcube if you aren't familiar with them ) , and am trying to combine them into one java application. I have been trying test if this is possible for the past week and am completely stuck. I don't know if this is the best place to post this, but I figure people in the java forums might just complain about the differences between processing and java. I figured I'd try here first.
Here is what I am doing:
I have two applets (Applet1 and Applet2) inside Frames (Frame1, Frame2) a circle class and my main class. The problem is that the Circle Object created in the main class is out of scope in regards to the applets. I have tried using java's clonable, writing my own copyable method and even overwriting the Circle object, but it will not compile. Any refrence to the main circle object "
aNewCircle" is highlighted because it is an unknown variable.
My goal is to have two applets each drawing the same circle. Changing the color or position attribute of an circle in one applet should instantly show the same change in the other applet.
I have tried every scope imaginable for aNewCircle. static, public, protected ect..
I have never posted to a fourm before so please correct me if i am lacking etiquette. I am sandboxing having 2 processing windows, each with the capability to be resized. The software is to control LED cubes. You can see the progress here:
https://github.com/spudstud/All-Spark-Cube.
Here is the code I have been experimenting with. It draws 2 windows, but when you try and resize the window the application crashes (Running OSX 10.7, Processing 1.5.1, Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720).
I'd really appreciate some advice from anyone who has got multiple frames working.