This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
1) Dialog window should disappear when click on "X"
2) Dialog window should minimize when click on "-"
3) Dialog window should maximize when click on "="
4) Dialog window should disappear when click on "Cancel"
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.
Really? I remember having to implement a WindowListener to close a JFrame, but the exact recommended procedure kept changing, and then I stopped working with Swing. However, Mike is using and old-old-school AWT Frame. I really can't remember how those worked at all.