@@ -83,8 +83,8 @@ public class HolonCanvas extends JPanel implements ActionListener {
// the central mass
bodies.add(0, new HolonBody(center.width, center.height, 0, 0, 1e6 * solarmass, new Color(0, 0, 0)));
for (int i = 0; i < N - 1; i++) {
- int px = (int) (Math.random() * 201);
- int py = (int) (Math.random() * 201);
+ int px = (int) (Math.random() * this.getWidth());
+ int py = (int) (Math.random() * this.getHeight());
double mass = (subnets.get(i).getObjects().size()) / 10 * solarmass * 10 + 1e20;
Color color = model.getSubNetColors().get(i);
@@ -120,6 +120,7 @@ public class StatisticGraph extends JPanel {
default:
break;
}
+ g2.setColor(set.getColor());
g2.draw(path);