🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JMenuBar painting problem

#10759
From: Paul Furbacher [TeamB]
Date: Tue, 17 Aug 1999 00:00
19 lines
1349 bytes
Jim Stoll wrote:
> 
> I'm adding/removing JMenus to a JMenuBar at runtime via the
> JMenuBar.add()/remove() methods.  The JMenus are being added and removed
> from the JMenuBar object, but are not being repainted appropriately -
> I'm ending up with 'holes' in my menu that remain there until I
> physically resize the JFrame that holds the JMenuBar - on resize of the
> frame, the proper paint operation occurs and things are updated.  I've
> tried calling paint, repaint, paintComponent, paintChildren, etc, but
> all to no avail.
> 
> What can I do to ensure that the UI is visually updated when I
> add/remove items to/from the JMenuBar?

Just a guess, but have you called 'invalidate()' on either the menubar
or its parent?


Paul Furbacher  (TeamB)
Technical Details
Message-ID: <37B9DE36.91FDB14D@bilbo.bio.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37B9940A.BB6B5F97@crtnet.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9687ead9ed7fb42d
X-Google-Attributes: gid111d45,public
From: "Paul Furbacher [TeamB]" <pf@bilbo.bio.purdue.edu>
Subject: Re: JMenuBar painting problem
Date: 1999/08/17
Message-ID: <37B9DE36.91FDB14D@bilbo.bio.purdue.edu>
X-Deja-AN: 513967732
Content-Transfer-Encoding: 7bit
References: <37B9940A.BB6B5F97@crtnet.com>
Content-Type: text/plain; charset=us-ascii
Organization: Reverse Alchemy, Inc.
Mime-Version: 1.0
Reply-To: pf@bilbo.bio.purdue.edu
Newsgroups: borland.public.jbuilder.java.swing