// The code of PopMenuApplet reworked so that it can be used by PopMenuProg.
// Barry Cornelius, 20 June 2000
import java.awt.    BorderLayout;
import java.awt.    Container;
import javax.swing. JApplet;
import javax.swing. JFrame;
import javax.swing. JMenuBar;
import javax.swing. JScrollPane;
import javax.swing. JTextArea;
import javax.swing. JTextField;
public class PopMenuApplet extends JApplet
{
   private JFrame iJFrame;
   public void init()
   {
      final int iJFrameX = 100;
      final int iJFrameY = 100;
      final int tJDialogX = 100;
      final int tJDialogY = 200;
      final Pop tPop = new PopImpl();
      iJFrame = new JFrame("PopMenuApplet");
      final JTextField tResultsJTextField = new JTextField();
      final JTextArea tLogJTextArea = new JTextArea(5, 30);
      final Container tContentPane = iJFrame.getContentPane();
      tContentPane.add(tResultsJTextField,             BorderLayout.CENTER);
      tContentPane.add(new JScrollPane(tLogJTextArea), BorderLayout.SOUTH);
      final PopMenu tPopMenu =
            new PopMenu(iJFrame, tPop, tJDialogX, tJDialogY, 
                        tResultsJTextField, tLogJTextArea);
      final JMenuBar tJMenuBar = tPopMenu.getJMenuBar();
      iJFrame.setJMenuBar(tJMenuBar);
      iJFrame.setLocation(iJFrameX, iJFrameY);
      iJFrame.pack();
      iJFrame.setVisible(true);
   }
   public JFrame getJFrame()
   {
      return iJFrame;
   }
}
