file dialog

Hello I found this code and fail to understand what is the meaning of the 'parent' variable?

JFileChooser chooser = new JFileChooser();

// Note: source for ExampleFileFilter can be found in FileChooserDemo,

// under the demo/jfc directory in the Java 2 SDK, Standard Edition.

ExampleFileFilter filter = new ExampleFileFilter();

filter.addExtension("jpg");

filter.addExtension("gif");

filter.setDescription("JPG & GIF Images");

chooser.setFileFilter(filter);

int returnVal = chooser.showOpenDialog(parent);

if(returnVal == JFileChooser.APPROVE_OPTION) {

System.out.println("You chose to open this file: " +

chooser.getSelectedFile().getName());

Thank u!

[743 byte] By [codingGa] at [2007-11-27 4:55:06]
# 1
http://java.sun.com/javase/6/docs/api/javax/swing/JFileChooser.html#showOpenDialog(java.awt.Component)
hiwaa at 2007-7-12 10:09:57 > top of Java-index,Java Essentials,New To Java...