If you want the size() method to resize your window you need a least to declare one. I suggest you replace
void setup(){
size(500,500);
}
with
void setup(){
JFrame myFrame = new JFrame();
myFrame.setSize(500,500);
myFrame.setVisible(true);
}
2
solved size() command not working when containing method is run within a static method [closed]