Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34425
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to extend an array |
| Date | Tue, 31 May 2016 11:56:16 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 32 |
| Message-ID | <nikc72$c5q$1@dont-email.me> (permalink) |
| References | <ae727260-8c33-4648-8995-f387a6eb8b52@googlegroups.com> <nikc0f$b0v$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 31 May 2016 15:56:19 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="12474"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1Ma6Tz4RiUMI+9iJCSLN/" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
| In-Reply-To | <nikc0f$b0v$1@dont-email.me> |
| Cancel-Lock | sha1:bozyE9aQ/RDGYLse8+GvqN3ZKjs= |
| Xref | csiph.com comp.lang.java.programmer:34425 |
Show key headers only | View raw
On 5/31/2016 11:52 AM, Eric Sosman wrote:
> [...]
> One simple way to ensure that construction happens on the EDT:
>
> public static void main(String[] args) {
> SwingUtilities.invokeLater(new Runnable() {
> Class2 myWindow = new Class2();
> ... et cetera ...
> myWindow.setVisible(true);
> });
>
> (The fashion nowadays is to use a "lambda expression" instead of an
> explicit "new Runnable()", but I didn't want to risk spooking you.)
... and while de-lambda-izing my spooky example, I botched it.
Sorry; that should have been
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Class2 myWindow = new Class2();
... et cetera ...
myWindow.setVisible(true);
}
});
(Sigh.)
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 07:52 -0700
Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 11:52 -0400
Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 11:56 -0400
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 09:19 -0700
Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 14:01 -0400
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 09:09 -0700
Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 14:11 -0400
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 11:25 -0700
Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 17:01 -0400
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-01 04:57 -0700
Re: How to extend an array Roedy Green <inquiry@mindprod.com> - 2016-05-31 21:56 -0700
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-01 04:49 -0700
Re: How to extend an array Robert Klemme <shortcutter@googlemail.com> - 2016-06-01 23:07 +0200
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-03 05:38 -0700
Re: How to extend an array Robert Klemme <shortcutter@googlemail.com> - 2016-06-04 19:17 +0200
Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-03 08:52 -0700
csiph-web