🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Non modal dialogs

#16044
From: Leo Cohen
Date: Fri, 09 Apr 1999 00:00
33 lines
1781 bytes
I am using JFrame1 as a parent window for two non modal dialogs, dialog2
and dialog3 built on JFrame2 & JFrame3 respectively. The user will make
a selection in dialog2 and then press an OK or Cancel button in dialog3. 

After my code executes the setVisible(true) for the dialogs, I want the
program to wait for user input in dialog3 (OK or Cancel) before
proceeding. 

Right now the program executes all of the code following
setVisible(true), stopping for nothing. At some point the dialogs come
up, and the dialog3 listeners respond to the button pressed. This
identifies the selection in dialog2 and the button pressed in dialog 3,
closes the dialogs and returns. 

The problem is that I have no clue where the return goes on leaving the
button response code in dialog3. That is, it is not returning to the
caller in JFrame1 (it already did that after the setVisible(true),
therefore I can't find out which dialog3 button was pressed, and I can't
get the selection made in dialog2.

So here's the question: how do I get the program to wait for input right
after the setVisible(true)?
-- 
Leo Cohen

116-1 Howard Drive
Charlottesville, VA  22903

804-243-8922 (UVA)
804-244-4648 (home)
804-244-7922 (home fax)
815-550-9313 (office fax)
lcohen@cs.virginia.edu
Technical Details
Message-ID: <370E19E1.6DBBFED2@cs.virginia.edu>
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: f74b3,eb338574bbeeb2b8,start
X-Google-Attributes: gidf74b3,public
From: Leo Cohen <lcohen@cs.virginia.edu>
Subject: Non modal dialogs
Date: 1999/04/09
Message-ID: <370E19E1.6DBBFED2@cs.virginia.edu>
X-Deja-AN: 464459107
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language