home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------
- // %s.java:
- // Implementation for menu creation class %s
- //
- //------------------------------------------------------------------------------
- import java.awt.*;
-
- public class %s
- {
- Frame m_Frame = null;
- boolean m_fInitialized = false;
-
- // MenuBar definitions
- //--------------------------------------------------------------------------
- MenuBar mb;
-
- // Menu and Menu item definitions
- //--------------------------------------------------------------------------
- %s
- // Constructor
- //--------------------------------------------------------------------------
- public %s (Frame frame)
- {
- m_Frame = frame;
- }
-
- // Initialization.
- //--------------------------------------------------------------------------
- public boolean CreateMenu()
- {
- // Can only init controls once
- //----------------------------------------------------------------------
- if (m_fInitialized || m_Frame == null)
- return false;
-
- // Create menubar and attach to the frame
- //----------------------------------------------------------------------
- mb = new MenuBar();
- m_Frame.setMenuBar(mb);
-
- // Create menu and menu items and assign to menubar
- //----------------------------------------------------------------------
- %s
- m_fInitialized = true;
- return true;
- }
- }
-