import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PanelFortune extends JPanel { /* DECLARATIONS:Create 2 labels: one for the words, one for the picture (both are JLabels) */
public PanelFortune(){ /* on the words label, display the message "Find your fortune" */ /* on the picture label, display the smiling face */ /* create a button, attach a listener, and add the button to the panel */ } private class Listener implements ActionListener { public void actionPerformed(ActionEvent e) { /* generate a random number from 0 to 5 and show the matching fortune. Show a smile if good or frown if not */ } } }