Check out example codes for "how to change size of the window in processing". It will help you in understanding the concepts better.

Code Example 1

size(800, 600);  // (must be first line inside void setup())

Learn ReactJs, React Native from akashmittal.com