I uninstalled JDK 1.6.26, then installed JDK 7 and changed my PATH to point to the new version.
However when I now open NetBeans it shows me this error:

Cannot locate java installation in specified jdkhome:
C:\Program Files\Java\jdk1.6.0_25
Do you want to try to use default version?
How can I make JDK 7 the default JDK that NetBeans uses?