The Graphical User Interface (GUI) for this applet needs a component to handle the user's input, and another component to display the prime numbers. A TextField would be an appropriate input component, because the user needs to input a single integer value. The TextField can also serve as the means by which the user indicates that an action should be taken. Whenever the user types a Return or Enter in the TextField, the program should test the TextField's current value for primality.
The output component should allow the program's output to extend over several lines. This is a perfect job for a TextArea. In addition to these components, we'll need a Label to prompt the user as to what kind of input is expected. Figure 1 provides a summary of the GUI.