Can I make fill() static?

So I wanted to call fill() in a subroutine and it apparently cannot be called in a static function. So I removed the static keyword and now there is no error, but the function doesn’t work anymore, it simply renders the same color as before. Is there a way I can make fill() static or do some sort of object call?

Hello,

Please provide a minimal example with the problem.

Formatting:
https://discourse.processing.org/faq#format-your-code

Reference:
https://processing.org/reference/static.html

:)

public void rd(v){
  fill(#ff0000);
  line(0,0,511,511);
  return;
}

And fill() does not work. It simply keeps the old color.

It said that fill cake from PApplet (idk what it is) so I tried creating a PApplet object and using that to reference but then my vm crashed :confused:

I should clarify it was the java vm