Some other helpful graphics commands:

getWidth(); // returns the width of the screen.
getHeight(); // returns the height of the screen.
add(object); // adds an object to the screen.
remove(object); // removes an object from the screen.
getElementAt(x, y); // returns the element at x, y