home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
visualj
/
vjtrial.exe
/
RCDATA
/
CABINET
/
devjava.pkg
/
TEMPLATE
/
105
< prev
next >
Wrap
Text File
|
1997-01-28
|
2KB
|
73 lines
//------------------------------------------------------------------------------
// %s.java:
// Implementation for menu creation class %s
//
// WARNING: Do not modify this file. This file is recreated each time its
// associated .rct/.res file is sent through the Java Resource Wizard!
//
// This class is use to create a menu on a Frame object. For addtional
// information on using Java Resource Wizard generated classes, refer to the
// Visual J++ 1.1 documention.
//
// 1) Import this class in the .java file for the Frame that will use it:
//
// import %s;
//
// 2) Create an instance of this class in your Applet's 'main' member, and call
// CreateMenu() through this object:
//
// %s menu = new %s (frame);
// menu.CreateMenu();
//
// 3) To process events generated from user action on the menu, implement
// the 'handleEvent' member for your Frame:
//
// public boolean handleEvent (Event evt)
// {
//
// }
//
//------------------------------------------------------------------------------
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;
}
}