Article View: borland.public.jbuilder.java.swing
Article #7566Re: Best way to show pop-up window?
From: albel
Date: Fri, 19 Jan 2001 08:06
Date: Fri, 19 Jan 2001 08:06
36 lines
2009 bytes
2009 bytes
I think you can use JLayeredPane which allows dipslay components over
components.
layer=this.getRootPane().getLayeredPane();
cc=new XPanel();
cc.add more compoents
layParent.add(cc,JLayeredPane.POPUP_LAYER,0);
cc.setBounds(x,y,w,h);
cc.setVisible(true);
"Steve Swett" <swett@ncats.net> wrote in message news:3a6377a0_2@dnews...
> In an applet:
>
> My main pane shows information about a student, including a list of
parental
> contacts in a JTable. When the user double-clicks a parent's name, I'd
like
> to display a new window that is centered on the screen, but is a bit
smaller
> than the main pane. The only things in the new window would be several
> label components and an OK button. After the user would view the
> information and press an OK button, the pop-up window would go away and
the
> main pane would be shown once again.
>
> What is the best way to do something like that? I'm pretty new with Java,
> so I don't know whether I should be looking at a dialog, option pane, or a
> card layout solution. (or something else)
>
> TIA
>
>
Technical Details
Message-ID:
<3a67f465_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!195.22.164.90References:
<3a6377a0_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,267d9c3d9ca6f479 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-19 00:12:00 PST Reply-To: "albel" <albel@xxx.lt> From: "albel" <albel@xxx.lt> Newsgroups: borland.public.jbuilder.java.swing References: <3a6377a0_2@dnews> Subject: Re: Best way to show pop-up window? Date: Fri, 19 Jan 2001 10:06:03 +0200 Lines: 38 Organization: ELSIS X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 195.22.164.90 Message-ID: <3a67f465_1@dnews> X-Trace: 19 Jan 2001 00:01:41 -0800, 195.22.164.90 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!195.22.164.90