🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #567

Re: Modal windows and getting their input back to the main window

#567
From: Scott
Date: Mon, 07 Mar 2005 14:30
46 lines
2506 bytes
I haven't actually written the code yet.

Let's say my main application does something to a database, but before the
operation can occur, the user must login.

So form1 is the "do something to the database" form.  Form2 is the login.

I've read that if I use the Dialog class, Form2 (login) requires Form1 in
its constructor.

In that case, would I implement a "loginButtonPressed" method in Form1 (the
main app)?  Or is there a better mechanism?

And if I don't use a modal window (let's say I want something like a
Search/Replace form), what is the correct way?

Thanks
Scott


"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:xn0dzgkw96i3u4c002@newsgroups.borland.com...
> On 3/4/2005 at 5:23:20 PM, Scott Powell wrote:
>
> > I've got the Java Certification training book and am looking over
> > windowing stuff.
> >
> > But I can't find anything that tells me how, if Form1 opens Form2 (say a
> > login window), how Form1 finds out what data was entered to Form2.
> >
> > I don't know if there's a "built-in" way
(form2.getParent().setUsername()
> > seems unlikely given types),
>
> You do not say what "form1" and "form2" are, and exactly what you mean by
> "form1 opens form2".  Can you post some code that more clearly shows what
> you are referring to?
>
> -- 
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <422c658d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4228e0d8$1@newsgroups.borland.com> <xn0dzgkw96i3u4c002@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,9deb20d8c75a3c05
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Scott" <scotthpowell@yahoo.com>
From: "Scott" <scotthpowell@yahoo.com>
Newsgroups: borland.public.jbuilder.java.language
References: <4228e0d8$1@newsgroups.borland.com> <xn0dzgkw96i3u4c002@newsgroups.borland.com>
Subject: Re: Modal windows and getting their input back to the main window
Date: Mon, 7 Mar 2005 06:30:19 -0800
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 4.28.245.129
Message-ID: <422c658d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110205837 4.28.245.129 (7 Mar 2005 06:30:37 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail