Article View: borland.public.jbuilder.java.swing
Article #9884Re: JMenu and JPanel
From: John P. McGrath
Date: Mon, 27 Dec 1999 00:00
Date: Mon, 27 Dec 1999 00:00
23 lines
1348 bytes
1348 bytes
On Thu, 23 Dec 1999 15:01:30 -0500, Alexandre Reis wrote: > Somebody who works with me has created a class that extends > JPanel. This class is a calendar gui. > > Now I want to add this calendar to a JMenu or something that > looks like it. > > What I want to do is when the user clicks on a label, the > calendar shows up at the bottom of that label. When the date > is selected then the calendar disappears. Somebody told me > that the best way to do that was to add it to a JMenu. Can > anybody point me to the right direction? If you want the calendar to disappear only when the user selects a date, then you probably just want to use the calendar component as is. If you want it to disappear if the user clicks on another component, then I think you want to place it in a JPopupMenu, and show that. -- John P. McGrath <JPMcGrath@fast.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.12d1d441e6931343989716@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38627F9A.287C2AE1@mitra.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,7c0ccc2564f67082 X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: JMenu and JPanel Date: 1999/12/27 Message-ID: <MPG.12d1d441e6931343989716@forums.borland.com> X-Deja-AN: 565493060 References: <38627F9A.287C2AE1@mitra.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing