Square Problem

Creation of the following applet was inspired by a tweet from Cliff Pickover: Problem: Given that ABCD is a square, the measure of angle EAF = 45 degrees, BE = a, and DF = b, prove that x = a + b. In this applet, feel free to move point E around anywhere you'd like! You can also move the white vertices at the bottom, although all this will do is change the side length of the square. Can you formally prove what this applet informally illustrates?