@Override
	public void tick() {
        if (cylinderMassSlider.isActive()) {
            cylinderMassSlider.tick();
            cylinderMass = cylinderMassSlider.getValue();
            box = new Rectangle((int) (300 - (boxMass * 2)), 400, (int) (boxMass * 4), 40);
            vy = 0;
            ay = 0;
            timer = 0;
        }
        if (boxMassSlider.isActive()) {
            boxMassSlider.tick();
            boxMass = boxMassSlider.getValue();
            box = new Rectangle((int) (300 - (boxMass * 2)), 400, (int) (boxMass * 4), 40);
            vy = 0;
            ay = 0;
            timer = 0;
        }

        if (running) {
            if (box.getY() > 40.001) {
                timer++;
                ay = -9.8 / 60 / (1 + cylinderMass / (2 * boxMass));
                vy += ay;
                box.setBounds((int) box.getX(), (int) (box.getY() + vy), (int) box.getWidth(), (int) box.getHeight());
            }
            if (box.getY() < 40.001) {
                box.setBounds((int) box.getX(), 40, (int) box.getWidth(), (int) box.getHeight());
            }
        }
	}