Creating a frame within an applet involves:
1. Creating a subclass of Frame
2. Overriding window methods like init(), start(), stop(), and paint()
3. Implementing the windowClosing() method to call setVisible(false) when the window closes
An example program creates a SampleFrame subclass, instantiates it in the applet's init() method, and overrides start() and stop() to show/hide the frame. The frame is given a size and title and made initially invisible, later being set to visible.