Article View: borland.public.jbuilder.java.swing
Article #12590Re: Trying to display a swing menu system?
From: gmac
Date: Thu, 10 Dec 1998 00:00
Date: Thu, 10 Dec 1998 00:00
68 lines
2592 bytes
2592 bytes
I have worked with Delphi and JBuilder. Removing automatically generated code
sometimes confuses the IDE and components "disappear" from the design
window(although they are still actually present). With your frame compenent
showing in the designer tab, click on the menu folder and then double click on
the JMenuSystem
Icon. This should bring up the menu. To bring up the frame again, Doulble click
on the
this(XXXlayout) component below the UI folder.
Hope this helps.
george
Eric Advincula wrote:
> 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:
<366F93F3.676A73A5@nrm.root.or.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<73lgr3$eda30@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,509fdac7415dc047 X-Google-Attributes: gid111d45,public From: gmac <gmac@nrm.root.or.jp> Subject: Re: Trying to display a swing menu system? Date: 1998/12/10 Message-ID: <366F93F3.676A73A5@nrm.root.or.jp> X-Deja-AN: 420747038 Content-Transfer-Encoding: 7bit References: <73lgr3$eda30@forums.borland.com> X-Accept-Language: ja,en Content-Type: text/plain; charset=iso-2022-jp Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing