🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JMenuBar painting problem

#10753
From: Jim Stoll
Date: Tue, 17 Aug 1999 00:00
16 lines
1162 bytes
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?

Thanks!

Jim Stoll
jestoll@crtinc.com
Technical Details
Message-ID: <37B9940A.BB6B5F97@crtnet.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,9687ead9ed7fb42d,start
X-Google-Attributes: gid111d45,public
From: Jim Stoll <jestoll@crtnet.com>
Subject: JMenuBar painting problem
Date: 1999/08/17
Message-ID: <37B9940A.BB6B5F97@crtnet.com>
X-Deja-AN: 513855640
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing