import java.awt.*;                          // Java GUI classes
import java.applet.*;
import java.awt.event.*;
 
public class Stockmain{                     // to run: java Stockmain
  public static void main(String args[]) {
     Applet applet = new StockApplet();     // create the applet and 
     Frame frame = new StockFrame(applet);  // put it into a frame
   }
}
class StockFrame extends Frame implements ActionListener {
  public StockFrame(Applet applet) {
    super("Bestway Stock Trader");
    MenuBar menubar = new MenuBar();        // make a menu with Quit
    Menu file = new Menu("File",true);
    menubar.add(file);
    file.add("Quit");
    setMenuBar(menubar);
    file.addActionListener(this);
    add("Center",applet);
    setSize(620,680);
    applet.init();                          // start applet
    this.show();
  }
  public void actionPerformed (ActionEvent evt) {
    String arg = evt.getActionCommand();
    if (arg.equals("Quit")) {               // if Quit, exit
      System.exit(0);
    }
  }
}