home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 December
/
PCWKCD1296.iso
/
vjplusb
/
msdev
/
bin
/
ide
/
vj.pkg
/
TEMPLATE
/
105
< prev
next >
Wrap
Text File
|
1996-07-12
|
1KB
|
48 lines
//------------------------------------------------------------------------------
// %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;
}
}