News for hackers. Stuff that matters.
Re:Java 25 Officially Released by ameliaquining on Tuesday September 16, 2025 @12:42PM (#45264611)
Is Swing good now? Usually when people say Java is good now I assume they're not talking about Swing.
Re:Java 25 Officially Released by whartung on Tuesday September 16, 2025 @12:54PM (#45264780)
Swing is swing, it's as good as it's always been (eye of the beholder). As I understand it, it hasn't completely rotted on the shelf, they've made updates to the rendering to better leverage modern hardware, but it's not a modern toolkit by any means. But it is maintained, it still works.

JavaFX is good (I really like FX), and maintained, and portable. They just came out with 25 I think. But it's a completely different model than Swing.

Re:Java 25 Officially Released by ameliaquining on Tuesday September 16, 2025 @03:37PM (#45266905)
Sure, but the same might be said of the subset of Java that existed twenty years ago; this is different from what people mean when they say "Java's good now".
Re:Java 25 Officially Released by spopejoy on Tuesday September 30, 2025 @06:24AM (#45423847)
JavaFX is better than swing, having done both (swing in a past life). CSS support is the big deal, plus modern rendering pipelines. Add that to the nice FP goodies and for-real cross-plaf packaging, (plus LLMs to get you through the crufty bits), it's IMO a serious contender for desktop UI.
Re:Java 25 Officially Released by RyanHamilton on Tuesday September 16, 2025 @01:56PM (#45265545)
It's as great as it ever was. I like it as its very stable and has a good model of interaction but if you want a modern embeddable map or embeddable chart stick with web interfaces. If you do go with swing definitely check out flatlaf to make it look modern.
Re:Java 25 Officially Released by ako on Tuesday September 16, 2025 @03:11PM (#45266553)
I wrote a swing app a long time ago (20+ years ago) that was used in operating theaters to register organs for transplantation. Swing has saved many lives since. Swing has been good enough for a long time.
Re:Java 25 Officially Released by johnyzee on Tuesday September 16, 2025 @02:14PM (#45265778)
Your neighbor's dog barks at Swing.
Re:Java 25 Officially Released by freedomben on Tuesday September 16, 2025 @12:50PM (#45264724)
No, swing is pretty out of fashion if not deprecated. I know it pretty well, but still wouldn't choose it if starting a new project today.

I'd use Qt, though if you're not comfortable with C++ I've been told JavaFX is pretty good

Re:Java 25 Officially Released by pjmlp on Tuesday September 16, 2025 @01:23PM (#45265125)
Swing is standard part of JDK, there is nothing deprecated, it even got a Metal backend.
Re:Java 25 Officially Released by freedomben on Wednesday September 17, 2025 @10:08AM (#45276038)
Awesome, thank you, that is great to hear
Re:Java 25 Officially Released by dionian on Tuesday September 16, 2025 @12:57PM (#45264825)
ive tried javafx but its always easier to me to go back to swing, if it aint broke dont fix it.
Re:Java 25 Officially Released by mdaniel on Tuesday September 16, 2025 @11:50PM (#45271461)
As a point of reference, JetBrains platform is on top of swing, and I'd guess that's a significant contributor to why they're able to deliver consistently across Linux, macOS, and Windows. Unlike Eclipse SWT which ships native code for all the platforms it targets
Re:Java 25 Officially Released by ameliaquining on Wednesday September 17, 2025 @12:49AM (#45271792)
My understanding is that JetBrains puts a heroic amount of effort into making their Swing components not look terrible, and that they can do this because they're a well-resourced engineering-centric company whose main product is a GUI app whose users spend all day in it and often pay for it out of pocket. That Swing might be underrated for this use case (if you also need to ship cross-platform) is an intriguing possibility, but different from whether it's a good choice for the marginal GUI app.