Welcome to JavaRanch!
Are you sure you want to be using AWT? Swing succeeded AWT about 15 years ago for
Java GUI development.
For your questions:
1. By X, do you mean the X close link in the upper right corner of the Frame? If so, I don't remember.
2. Use a KeyListener.
3. The same KeyListener as 2.
4. An ActionListener.
Those aren't detailed answers I know, but they point you in the right direction.
You should give it your best try, and if you get stuck somewhere, we'll be here to answer any more specific questions you might have.
If you have a chance, please see
ShowSomeEffort (⇐Click) from the JavaRanch FAQ.