Article View: borland.public.jbuilder.java.swing
Article #13187Re: How Changing Menu at runtime
From: Matthew Krevs
Date: Fri, 28 Aug 1998 00:00
Date: Fri, 28 Aug 1998 00:00
23 lines
1227 bytes
1227 bytes
Just an idea... have you tried calling revalidate() or validate() after you add the menu items? JMenu and JMenuBar are JComponents and therefore also containers so you may have to call validate() or revalidate() or something so that the menu is layed out again. Michael R�ther wrote in message <6s3371$mia6@forums.borland.com>... >Hi > >I have a little problem adding a JMenu Component to a JMenuBar at runtime. >I use the Command JMenuBar.add(JMenu), this work well. The Problem is now I >don�t see the chage (the new MenuBar with the added JMenu) immediately. >The new JMenu is shown by changing the Frame size. > >Is there a method wich forces the desired behavior. > >Thanks a lot > >Michael > > >
Technical Details
Message-ID:
<6s4pp8$oev20@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6s3371$mia6@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,58131980b09ab841 X-Google-Attributes: gid111d45,public From: "Matthew Krevs" <mattkrevs@flex.com.au> Subject: Re: How Changing Menu at runtime Date: 1998/08/28 Message-ID: <6s4pp8$oev20@forums.borland.com> X-Deja-AN: 385448903 References: <6s3371$mia6@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing