home *** CD-ROM | disk | FTP | other *** search
/ Learn Java Now / Learn_Java_Now_Microsoft_1996.iso / JavaNow / Code / Chap17 / AutoFrame / AutoFrame.java < prev    next >
Encoding:
Java Source  |  1996-06-13  |  1.2 KB  |  65 lines

  1. // AutoFrame - exercise the RWMenu class
  2. import java.applet.*;
  3. import java.awt.*;
  4. import RWMenu;
  5.  
  6. public class AutoFrame extends Applet
  7. {
  8.  
  9.     public AutoFrame()
  10.     {
  11.         // TODO: Add Constructor code here
  12.     }
  13.  
  14.     public String getAppletInfo()
  15.     {
  16.         return "Name: AutoFrame\r\n" +
  17.                "Author: Stephan R. Davis\r\n" +
  18.                "Created for Learn Java Now";
  19.     }
  20.  
  21.  
  22.     public void init()
  23.     {
  24.         resize(320, 240);
  25.  
  26.         // TODO: Place Addition Initialization code here
  27.         // create a framed window
  28.         Frame frame = new Frame("ResourceWizard created menu");
  29.         frame.resize(400, 200);
  30.  
  31.         // now create a RWMenu on this frame
  32.         RWMenu menu = new RWMenu(frame);
  33.  
  34.         // finally create the members of the RWMenu
  35.         menu.CreateMenu();
  36.  
  37.         // now show the frame with the menu attached
  38.         frame.show();
  39.     }
  40.  
  41.     public void destroy()
  42.     {
  43.         // TODO: Place applet cleanup code here
  44.     }
  45.  
  46.     public void paint(Graphics g)
  47.     {
  48.     }
  49.  
  50.     public void start()
  51.     {
  52.         // TODO: Place additional applet Start code here
  53.     }
  54.     
  55.     public void stop()
  56.     {
  57.     }
  58.  
  59.  
  60.  
  61.  
  62.     // TODO: Place additional applet Code here
  63.  
  64. }
  65.