# Fill and line not displaying (Help for a beginner)

**URL:** <https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693>\
**Category:** Beginners\
**Created:** [April 27, 2019, 4:51pm UTC](https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693 "2019-04-27T16:51:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abigail](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@abigail](https://discourse.processing.org/u/abigail)\
**Post date:** [April 27, 2019, 4:51pm UTC](https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693/1 "2019-04-27T16:51:06Z")

</div>

Hi, my code is below 🙂

```auto
Water drop;

Water [] drops = new Water[300];

void setup() {
  size(600, 400);
  for (int i = 0; i < drops.length; i++) {
    drops[i] = new Water();
  }
}

void draw() {
  background(255);
  noStroke();
  fill(0);
  ellipse(width/2, 0, 100, 20);
  for (int i = 0; i < drops.length; i++) {
    drops[i].display();
    drops[i].fall();
  }

  fill(255, 153, 153);
  line(50, 0, 50, height);
}

class Water {

  float x;
  float y;
  float ySpeed;

  Water() {
    x = random(255, 345);
    y = 12;
    ySpeed = random(4, 7);
  }

  void display() {
    fill(0, 0, 200);
    rect(x, y, 3, 3);
  }

  void fall() {
    y = y + ySpeed;

    if (y > height) {
      y = 12;
    }
  }
}

```

It works just fine, but I have a two lines of code at the end of draw (line() and fill()) which aren’t displaying, can someone explain to me why?

Also, if anyone has any comments on my code, good or bad, I’d greatly appreciate!

Thanks in advance! 🙂

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [April 27, 2019, 4:55pm UTC](https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693/2 "2019-04-27T16:55:55Z")

</div>

Hi,

`line()` works with `stroke()`, not `fill()`.

And since you said `noStroke()` a bit more up, it is not displaying anything !

That should works:

```auto
stroke(255, 153, 153);
line(50, 0, 50, height);

```

---

<div class="post-metadata">

**Author:** ![abigail](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@abigail](https://discourse.processing.org/u/abigail)\
**Post date:** [April 27, 2019, 5:24pm UTC](https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693/3 "2019-04-27T17:24:12Z")

</div>

Thanks so much! I knew it would be something silly haha 🙂

---

<div class="post-metadata">

**Author:** ![swmarks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/swmarks/32/6015_2.png) [@swmarks](https://discourse.processing.org/u/swmarks)\
**Post date:** [August 6, 2019, 4:34am UTC](https://discourse.processing.org/t/fill-and-line-not-displaying-help-for-a-beginner/10693/4 "2019-08-06T04:34:53Z")

</div>

I’m a beginner myself, but I think you need to use stroke(), not fill(), to color a line. Hope this helps!
