CS 101 - 9/15/2011 Pictures Selection/Opening We really don't waant to "hard code" the name of a file into a program, because such a name depends on the overall folder structure of that particular computer We want to have the user of the program to select the file when the program runs. To do this we use the pickAFile () method from the FileChooser class. String filename; filename = FileChooser.pickAFile (); Picture p; p = new Picture (filename); Methods Subprogram inside of a class of a program public static ( ) { } Example: Write a method to draw a square with a turtle public static void drawSquare ( Turtle tParam ) { } Each method is invokes by a method call statement. When calling a public static method from the current class, we can just use the method name in the call statement. Turtle t; . . . drawSquare ( t );