Anonymous classes have all of their methods declared immediately following the call to the new operator. Frames are the main window for applications. Typically yur application will extend Frame to create the main window of the application. Frames have a border, a title bar, and control buttons. You have to handle the window closing event to actually kill an application.
Dialogs are pop-up windows that usually require immediate action from the user.
Dialogs can be used to display messages or get input from the user.