Reference+
Name
setLocation()
Description
The setLocation() function defines the position of the Processing sketch in relation to the upper-left corner of the computer screen.
There are more features of PSurface documented in the Processing JavaDoc.
Examples
void setup() { size(200, 200); surface.setTitle("Hello World!"); surface.setResizable(true); surface.setLocation(100, 100); } void draw() { background(204); line(0, 0, width, height); line(width, 0, 0, height); }
Syntax
surface.setLocation(x, y)
Parameters
x
int: x-coordinate of the surfacey
int: y-coordinate of the surface
Return
void
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.