There are some interesting things on this list, and in some of the follow-on messages. This reply is just looking at the AWT issue.

It depends on what you mean by "remove AWT". Removing all internal dependencies (aside from Swing/JavaFX interop of course) on java.desktop (AWT/Swing/Java2D) and providing replacement API for the functionality that is missing in JavaFX would be a very large effort. At a minimum:

Implementation dependencies:
* Refactor Java Beans implementation in javafx.base such that java.desktop is optional * Rewrite implementation of JavaFX printing to use native printing capability (this is a large effort) * Any other places where the implementation in javafx.graphics uses some Java2D utilities (it looks like we might have removed the last of these)

New API for missing features to reach parity with java.desktop:
* Image I/O (this is the largest piece)
* Image operators
* Headless support
* Desktop integration (we want to do this anyway at some point)

If all you need from the list of missing features w.r.t. java.desktop is a Tray Icon (part of desktop integration), the largest piece would be the printing dependency. If you don't print, and can do a custom build of JavaFX to remove it, it might not be too bad, but still work.

-- Kevin


On 11/16/2023 1:08 AM, Dirk Lemmermann wrote:
It is mainly an issue when trying to run a JavaFX app natively (GraalVM, Gluon). You can not have AWT in your classpath when compiling to native code. It is not supported.
Dirk

Am 15.11.2023 um 20:31 schrieb David Alayachew <davidalayac...@gmail.com>:

My bigger question is asking what you lose by having AWT in JavaFX. Is there something fundamentally problematic about it that its removal would solve/alleviate a problem?

Whereas on the other hand, AWT has some very useful libraries that are in use by nearly all Java GUI frameworks. For example, if you want to do anything really complex with 2D Image work, you will inevitably end up using java.awt.BufferedImage. It's simple, but very fast.

On Wed, Nov 15, 2023 at 12:18 PM Dirk Lemmermann <dlemmerm...@gmail.com> wrote:

    3D: unfortunately that is completely out of my comfort zone … for
    this feature request I am merely the messenger.
    AWT: I was thinking that this is mostly a refactoring and
    probably code duplication?

    Dirk

    Am 15.11.2023 um 14:28 schrieb Nir Lisker <nlis...@gmail.com>:

        3D line and point primitives


    I filed https://bugs.openjdk.org/browse/JDK-8316398 for this
    already. As noted, it requires a somewhat complex computation
    for intersections and possibly for contains. If you would like
    to write these Mesh classes, like the current TriangleMesh, I
    can write the rest.

        removal of AWT


    Isn't that *a lot* of work? All the image IO is AWT, no?

    On Wed, Nov 15, 2023 at 10:48 AM Dirk Lemmermann
    <dlemmerm...@gmail.com> wrote:

        Hi guys,

        I already mentioned this at the JavaFX BOF at DEVOXX and
        also posted this on Twitter but wanna make sure it gets the
        visibility it deserves:

        All I want for Christmas is … / what I think is needed for
        JavaFX going forward ...

                - removal of AWT
                - a tray API (tray icon)
                - undecorated interactive stage style
                - blur support for stages
                - WebP image format support
                - native embedded browser (Chromium)
                - 3D line and point primitives
                - injection support in FXML for custom controls
                - TableView improvements, aka. TableView2

        (order of items does not imply priority)

        Dirk



Reply via email to