how to close panel window

how should I close the display panel window (as modal)

Tanveer

Assuming you mean the Displays Preferences Panel, this works for me in Tiger:

tell application "System Preferences"
	activate
	try  -- ignore the error that pops up
		close window 1
	end try
end tell