🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12691

Trying to display a swing menu system?

#12691
From: Eric Advincula
Date: Thu, 26 Nov 1998 00:00
54 lines
1876 bytes
I have two classes. 1 JTmsApp which is the main app and JMenuSystem which is
the menu system
The code in the menu system just creates a menu system.  It use to be part
of the JTmsApp and worked great.  Now the menu system will not come up.
Only the frame comes up.  Any hints on why my menu system doesnt come up.
It compiles fine no errors. ( left out all the imports to keep this message
short )
Am I doing something wrong. ( compiled using JDK1.2 all swing ).

public class JTmsApp extends JFrame {

 public JTmsApp() {
   // Create the menuing system
  JMenuSystem menuSystem = new JMenuSystem();

 }

 public static void main(String[] args) {

    JTmsApp window = new JTmsApp();
    window.setTitle( "Tax Management System" );
    window.setSize( 640, 480 );
    window.setVisible(true);
  }
}

public class JMenuSystem extends JFrame{

 /* Menu system variables */
 JMenuBar menuBar;
 JMenu menuFile, menuHelp;
 JMenuItem menuExit;

 public JMenuSystem(){

  /* Create the menu bar */
  menuBar = new JMenuBar();
  setJMenuBar( menuBar );

  /* File menu section */
  menuFile = new JMenu( "File" );
  menuBar.add( menuFile );
  // submenu system of File menu
  menuFile.addSeparator();
  menuExit = new JMenuItem( "Exit" );
  menuFile.add( menuExit );

  /* Help menu section */
  menuHelp = new JMenu( "Help" );
  menuBar.add( menuHelp );

 }

}
Technical Details
Message-ID: <73lgr3$eda30@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,509fdac7415dc047,start
X-Google-Attributes: gid111d45,public
From: "Eric Advincula" <eric07@earthlink.et>
Subject: Trying to display a swing menu system?
Date: 1998/11/26
Message-ID: <73lgr3$eda30@forums.borland.com>
X-Deja-AN: 416119929
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Newsgroups: borland.public.jbuilder.java.swing