Announcement

Collapse
No announcement yet.

Java 17 / OpenJDK 17 Hits GA With Maturing Vector API, Removal Planned For Applet API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by mazumoto View Post

    Are you sure JavaFX (2+) has anything to do with Webkit or even a Browser? I don't think Webkit is written in Java nor that it'd fit in those few small Jars you as dependencies to use it ...
    I think he may be confusing the fact that it has a webview component with that being the basis of the toolkit, which it is not.

    Comment


    • #32
      Originally posted by krzyzowiec View Post

      I think he may be confusing the fact that it has a webview component with that being the basis of the toolkit, which it is not.
      Yeah, JavaFX has nothing to do with the web. I've never used it personally, but I understand that it originally started out as a new API built on top of Swing widgets... basically a third attempt to get Java UI right, after the original AWT and then Swing.

      Comment


      • #33
        Originally posted by krzyzowiec View Post

        I think he may be confusing the fact that it has a webview component with that being the basis of the toolkit, which it is not.
        I'm not confusing that, although now that I read it back I could have made my point clearer, sorry for that.

        The point is jfx is like a web browser - you can even use CSS to style the UI components. Plus yes, it has the embedded WebView component so you can just embed a full Webkit, display a webpage and interact via JS. JFX is much more easier to port due to simpler architecture. Let me just quote Oracle, as they summed it up nicely in the docs:

        "The Glass toolkit is also responsible for managing the event queue. Unlike the Abstract Window Toolkit (AWT), which manages its own event queue, the Glass toolkit uses the native operating system's event queue functionality to schedule thread usage. Also unlike AWT, the Glass toolkit runs on the same thread as the JavaFX application. In AWT, the native half of AWT runs on one thread and the Java level runs on another thread. This introduces a lot of issues, many of which are resolved in JavaFX by using the single JavaFX application thread approach."


        Btw also part of this discussion - all of the java UI toolkits use GTK3 as a native backend in linux. This was always the case, although previously we had just GTK2 support and then it became a fallback path. https://openjdk.java.net/jeps/283

        gstreamer is also used for media playback if anyone is wondering.

        Comment


        • #34
          Originally posted by mdedetrich View Post
          Yup, or basically sealed in scala (i.e. sealed abstract class or sealed trait) so you can get proper exhaustive checking in pattern matching
          Yeah, for all that I'm one of those still stuck on Java 8, that's something I'm really looking forward to. They've been slowly adding the building blocks (e.g. named instanceof, sealed classes, switch expressions) over the last few releases, and full pattern matching on sealed classes will be the capstone of that. Not a feature I'd use every day, but incredibly useful for certain use cases...

          Comment


          • #35
            Originally posted by Leprechaunius View Post
            The point is jfx is like a web browser - you can even use CSS to style the UI components. Plus yes, it has the embedded WebView component so you can just embed a full Webkit, display a webpage and interact via JS. JFX is much more easier to port due to simpler architecture. Let me just quote Oracle, as they summed it up nicely in the docs:
            JavaFX is not a browser rendering engine though, it is a UI toolkit. Gnome/GTK uses CSS for styling too, but that's only because CSS is the best standard we have so far for UIs.

            Comment

            Working...
            X