Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36781
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Can you lock a dialog and continue? |
| Date | Fri, 30 Jun 2017 14:24:24 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 18 |
| Message-ID | <oj64pn$b1s$1@dont-email.me> (permalink) |
| References | <34333fbb-4b83-454b-9395-4efaa019e95e@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 30 Jun 2017 18:20:39 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="161b96caf829cfa25bb0efe69dfc8d9d"; logging-data="11324"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rMUT1uYERpMPAt4/EOqyQ" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
| In-Reply-To | <34333fbb-4b83-454b-9395-4efaa019e95e@googlegroups.com> |
| Content-Language | en-US |
| Cancel-Lock | sha1:ryvc2f7znC0r/QLnISBPhwVA6Tk= |
| Xref | csiph.com comp.lang.java.programmer:36781 |
Show key headers only | View raw
On 6/30/2017 1:35 PM, Eric Douglas wrote:
> I can display a window of type JDialog and keep running code, but if I display another one modal to that one to lock it, the code just freezes as soon as I make it visible until it's closed.
Um, er, that's what a "modal" dialog is supposed to do. Consider
an input-gathering dialog, like one where the user chooses "Proceed"
vs. "Cancel." The code shows the dialog, *waits until it closes*,
and collects the chosen answer.
If you don't want to wait, use a modeless dialog.
> I was hoping to use this to pop up a window to show the user a processing status with a JProgressBar so they can't interact with the first window while the program updates it (need to do a background task to get data then populate the window).
It's possible that I've failed to understand what you want to do,
but ... have you investigated javax.swing.ProgressMonitor?
--
esosman@comcast-dot-net.invalid
Thirteen hundred days to go.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can you lock a dialog and continue? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 10:35 -0700
Re: Can you lock a dialog and continue? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-30 14:24 -0400
Re: Can you lock a dialog and continue? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 11:34 -0700
Re: Can you lock a dialog and continue? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-06-30 14:33 -0500
Re: Can you lock a dialog and continue? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 13:19 -0700
Re: Can you lock a dialog and continue? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-06-30 15:35 -0500
Re: Can you lock a dialog and continue? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 13:56 -0700
Re: Can you lock a dialog and continue? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-06-30 15:40 -0500
Re: Can you lock a dialog and continue? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 13:52 -0700
Re: Can you lock a dialog and continue? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-30 21:14 +0000
Re: Can you lock a dialog and continue? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-30 17:19 -0400
csiph-web