Beside the file recovery (which is better to have installed before deleting!), there might be a trick, if you have run the sketch.
On Windows (at least), Processing creates the Java files to compile and run in a temporary directory. If you can find these files, you will find the source, wrapped in a bit of Java code, but mostly unharmed...
You might need to activate the view of hidden files and folders. I don't know for sure in Windows Vista, but on Windows XP, the temp folder is at:
C:\Documents and Settings\<your login name>\Local Settings\Temp\
There, you will find a number of folders named
untitled<bunch of numbers>.tmp (where the sketches you typed and not saved are kept),
console<bunch of numbers>.tmp (where System.out and .err are redirected before being displayed in the console pane) and
build<bunch of numbers>.tmp (where the .java files are generated and compiled to .class files).
If you find the latest buildnnnnnn.tmp folder, you might find your erased code there.
Now, it is also a good time to think about backups...
Or even better (and complementary to backups!): get familiar with source control management tools (SCM, aka. VCS, version control system) like Bazaar (my favorite, flexible and easy to use), Mercurial, Git (a bit complex and not yet really Windows friendly) or even Subversion (used by the Processing project, but I prefer now the distributed VCS like the first three).
Someday I will try and make a simple tutorial about Bazaar use for individual programmers: those on their site is very good but perhaps a bit intimidating (covering a lot, including team collaboration, etc.).
For example I experimented fearlessly the Delete menu item (which I never tried) on a little sketch I have.
I did then:
Code:> bzr ls _QuickExperiments\ArrayListTest\
_QuickExperiments/ArrayListTest/ArrayListTest.pde
(mmm, no longer there)
> bzr status
removed:
_QuickExperiments/ArrayListTest/TypedArrayList.java
(OK, Bazaar found the missing file)
> bzr cat _QuickExperiments/ArrayListTest/TypedArrayList.java > _QuickExperiments/ArrayListTest/TypedArrayList.java
(got it back!)
You can also revert to a previous version if your latest experiment failed, etc.