I have been creating a project in eclipse that is essentially a network map of connections between people (each person is a node, and it graphs connections between people by drawing edges between nodes). The network map has several different options as to which type of people it maps (family members, non-family members, or all people) in the sketch. I'm trying to make these options available off to the side of the GUI so the user can simply click on what people they would like to display and the sketch will modify itself in real time. I know that in order to do that, I have to temporarily halt the draw() method so I can modify variables before resuming the draw method. Therefore, I use noLoop(), then reset and modify the variables, then use loop(), as shown below, but I still get the ConcurrentModificationException coming out of my hashMap... any ideas as to why this still happens?
Relevant code:
if(e.getSource() == familyBtn {
embed.setVariables(bloomfieldUsed, false, true);
resetDisplay();
}
private void resetDisplay() { //embed is the Processing Applet contained in my GUI
embed.clear(); //simply calls noLoop, then resets all global variables to 0 or null
I have been creating a project in eclipse that is essentially a network map of connections between people (each person is a node, and it graphs connections between people by drawing edges between nodes). I created it in Processing, and am now trying to move it over to eclipse. It works fine in Processing, and in eclipse, as a Java Applet, it shows only a gray area. However, as a Java Application in Eclipse, it works fine, except the image shown is not in the center of the screen, but rather is in the bottom right and the edges are cut off. How do I re-position the image created into the Java Application box?
Thanks
Relevant code attached:
public void setup() {
size(260, 160);
if (showEdges)
defaultEdgeColor = edgeColor;
else
defaultEdgeColor = noEdgeColor;
c = new GUIController (this, true);
familyBtn = new IFButton ("Show family only", 40, 40, 180, 17);