Width and height return 0

From what I know, displayWidth and displayHeight cannot be set to equal another variable. I’m sure someone else can give a better explanation as to WHY that is :smiley: What you would have to do is:

Which is specifically for your fullScreen code:

ellipse( displayWidth/2, displayHeight/2, 30, 30);

Which would then would put your ellipse at the center.

Another way you could do it for ANY sized screen, full screen or not, is by simply doing:

ellipse(width/2,height/2,30,30);

Ellipses are drawn around the center as you know, but you did say why you had the +50.

I think that the reason why you can’t set other variables equal to your width and height variables have to do with the fact that they are system variables. :thinking:

Anyways, I hope that helps you. By the way, please make sure that you format your code :smiley: It makes it look much nicer, and also is easier for us to read it!

You do that by highlighting your code and clicking the “Format” button, or by just highlighting it and pressing Control+Shift+C, Like this:

System.out.println("I am formatted code!");

EnhancedLoop7