RFR: 8357176: java.awt javadoc code examples still use Applet API [v2]

Sergey Bylokhov serb at openjdk.org
Tue May 20 21:19:51 UTC 2025


On Tue, 20 May 2025 20:30:21 GMT, Phil Race <prr at openjdk.org> wrote:

>> Update the some code examples and accompanying images to no longer mention or display as applets.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8357176

src/java.desktop/share/classes/java/awt/GridLayout.java line 50:

> 48:  *
> 49:  *     EventQueue.invokeAndWait(() -> {
> 50:  *        Frame frame = new Frame("GridLayout");

I would like to bring this to the discussion not necessarily suggesting any changes. I noticed that the example uses a "frame", while the description above refers to a "window" it might be worth unification. Also, regarding invokeAndWait: it’s not strictly necessary here since this is AWT but it does not break anything. However, I wonder if it’s worth discussing the use of invokeAndWait vs invokeLater. In tests, we usually prefer invokeAndWait because we need to wait for the action to complete, but in applications invokeLater should work fine.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25278#discussion_r2098892219


More information about the client-libs-dev mailing list