Hacker News new | ask | show | jobs
by thesuperbigfrog 2395 days ago
I agree with you. JavaFX is better than Swing for most use cases.

I gave the Swing "Hello World" example because it shows a minimal, simple example of how little code is needed to create cross-platform GUI in Java.

JavaFX is also technically an external library now since Oracle spun out JavaFX to OpenJFX and Gluon has taken over development and maintenance, although many but not all OpenJDK distributions include it.

1 comments

Makes sense. The tornadofx hello world is pretty minimal too:

    class HelloWorld : View() {
      override val root = HBox(Label("Hello world!"))
    }

    class HelloWorldApp : App() {
      override val primaryView = HelloWorld::class
    }
I've bee conflicted in my research on choosing Tornado or default JavaFX
I'm waiting for Tornado to support Java 11+ before I jump on the bandwagon. It's getting closer[1], but it's still not production ready, from what I can tell.

[1]: https://github.com/edvin/tornadofx/issues/899

Well I guess that makes it easier. I'd rather write Java than Kotlin anyway.
Really? That's the first time I've ever heard someone say that. What is it about Kotlin you don't like?
I just like Java. I know it well and mainly don't have issues with the problems kotlin is trying to solve. The main benefits I see of kotlin are coroutines (coming to java with project loom) and nullable reference types (which isn't a deal breaker for me).

I also don't enjoy functional programming, I find that it quickly becomes unreadable and kotlin is a weird mix between FP and OOP.