Article View: borland.public.jbuilder.java.swing
Article #10685Re: JMenuBar painting problem
From: Paul Furbacher [TeamB]
Date: Thu, 19 Aug 1999 00:00
Date: Thu, 19 Aug 1999 00:00
29 lines
1750 bytes
1750 bytes
Jim Stoll wrote: > > I hadn't tried the invalidate() followed by the repaint(), but unfortunately, that > didn't solve the problem either (though it did improve it over what it was prior > to the show() method approach...) > > If you get a few moments, try adding another button that adds a menu to the > menubar and see if that works for you. When I add a menu, it doesn't show up > until I click the JFrame's border. When I remove a menu, I end up w/ a 'hole' in > the menubar where the removed item was. In my obviously much simpler example, it still works. > The general scheme that I have is as follows: > MDIFrame extends JFrame > MDIDesktopPane extends JDesktopPane > MDIDesktopManager extends DefaultDesktopManager > MDISheet extends JInternalFrame Yikes! Much more complex. What about asking the menuBar for its parent and telling it to repaint() after having called invalidate() on the menuBar? menuBar.invalidate(); menuBar.getParent().repaint(100); Paul Furbacher (TeamB)
Technical Details
Message-ID:
<37BC2768.BC8BE0CB@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37B9940A.BB6B5F97@crtnet.com> <37B9DE36.91FDB14D@bilbo.bio.purdue.edu> <37BAA3F7.C4E4D0B1@crtnet.com> <37BAC7E8.4213E34D@bilbo.bio.purdue.edu> <37BB1F60.6177EEA2@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/19 Message-ID: <37BC2768.BC8BE0CB@bilbo.bio.purdue.edu> X-Deja-AN: 514723133 Content-Transfer-Encoding: 7bit References: <37B9940A.BB6B5F97@crtnet.com> <37B9DE36.91FDB14D@bilbo.bio.purdue.edu> <37BAA3F7.C4E4D0B1@crtnet.com> <37BAC7E8.4213E34D@bilbo.bio.purdue.edu> <37BB1F60.6177EEA2@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