Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39964
| From | Knute Johnson <knute2023@585ranch.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java 21 and [this-escape] warnings? |
| Date | 2023-06-10 13:23 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <u62f3u$2ck76$1@dont-email.me> (permalink) |
| References | <u60jra$2275l$1@dont-email.me> <u61nr4$29s54$1@dont-email.me> |
On 6/10/23 06:46, Daniele Futtorovic wrote: > Hi Knute, > > Still Swing-ing? :-) > Nice to hear from you Daniele. Yes, they keep paying me and I keep writing Swing code. Works well and it is quick to write. > > The one I don't get (and haven't been able to reproduce) is the > #setBorder call. I saw it once and couldn't make the combination right to get it to show up again. > Is [this-escape] a warning/error that's been specifically added in > JDK21? I reckon the problem itself isn't new or changed, and that it's > always been there. It's a feature of the Java 21 compiler. Things keep getting better/tighter all the time. > As such, you would have two choices, as before: ignore the warning or > change your habits. See Eric Sosman's post. > For illustration, with Swing I'd made it a habit to construct my UI in > #addNotify, for self-constructing components. That wouldn't be > applicable to the frame, which you could for instance construct > externally (I mean in a factory) with a self-constructing content pane. I'll have to try that. It is just so different from the way I've been writing Swing code for the last 20 years:-). Thanks for the post. -- Knute Johnson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java 21 and [this-escape] warnings? Knute Johnson <knute2023@585ranch.com> - 2023-06-09 20:32 -0500
Re: Java 21 and [this-escape] warnings? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2023-06-10 13:46 +0200
Re: Java 21 and [this-escape] warnings? Knute Johnson <knute2023@585ranch.com> - 2023-06-10 13:23 -0500
Re: Java 21 and [this-escape] warnings? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2023-06-11 14:45 +0200
Re: Java 21 and [this-escape] warnings? Eric Sosman <donalhambra@gmail.com> - 2023-06-10 06:58 -0700
Re: Java 21 and [this-escape] warnings? Knute Johnson <knute2023@585ranch.com> - 2023-06-10 13:26 -0500
Re: Java 21 and [this-escape] warnings? Arne Vajhøj <arne@vajhoej.dk> - 2023-06-10 18:57 -0400
csiph-web