r/java • • May 13 '20

Java Client Roadmap Updates

https://blogs.oracle.com/java-platform-group/java-client-roadmap-updates
47 Upvotes

12 comments sorted by

View all comments

10

u/GullibleRaspberry9 May 13 '20

Good news about Swing and AWT. They need to stay in the core and get some development improvements and bug fixes.

7

u/ObscureCulturalMeme May 14 '20 edited May 14 '20

Every time I read the class javadoc for HTMLEditorKit (iirc) and get to the part something like "supports HTML 3.2 with plans to migrate to future versions," I weep a little inside.

I really don't want to migrate one of our largest projects at work to JavaFX simply to get HTML 5, and getting the OpenJFX components to play nicely with Swing has been repeatedly annoying. So that project stays with Swing, and it continues to Just Work.

15

u/GullibleRaspberry9 May 14 '20

yeah it really is disheartening to think how much time and effort was ultimately wasted on JavaFX instead of bolstering Swing. I get at the time Sun was trying to compete with the web, Flash, and Silverlight, but ultimately in my opinion it was for naught. JavaFX is not even close to young anymore and it still has gaps.

Instead, I wish the focus and effort had gone into making Swing the best cross platform desktop GUI framework possible. It is pretty great as is. Imagine where it could be now.

3

u/sievebrain May 14 '20

JavaFX wasn't a waste. Swing is a dead-end API in many ways. It would have been very hard to bring it up to the functionality JavaFX has. It's really hard to justify using Swing for new projects on its own merits: usually the reason cited for doing so is simply that it's been around longer and has some exotic custom controls available.

2

u/GullibleRaspberry9 May 14 '20 edited May 14 '20

I guess it is different preferences. I am talking about cross platform desktop framework. Not what JavaFX is targeted at - which I am not really certain what that is as it appears to try to be more web like.. In that context, I would never use JavaFX to build a real desktop application; something like Netbeans or IntelliJ, hell not even MoneyDance (which is a good Swing app).

1

u/sievebrain May 15 '20

Interesting perspective. JFX doesn't try to mimic the look of the native toolkits, but that's quite common for many kinds of app these days.

What about JFX seems "web like" to you? The use of CSS?

1

u/chayatoure May 14 '20

I'm not all that familiar with the situation. Why did they develop javafx instead of swing?

2

u/wildjokers May 14 '20

You can use the JavaFX web component in your swing app. I did it to replace JDIC which finally stopped working in Java 9. As a bonus that particular app’s embedded web browser worked on all platforms instead of just windows. Works great.

https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/swing-fx-interoperability.htm

2

u/ObscureCulturalMeme May 14 '20

Yep, the HTML/CSS renderer tend to not be much trouble; it's the surrounding panels that explode at the drop of a hat.

Makes me wish the Swing support had been brought up to date, or backported from JavaFX, rather than abandoned. It's nice to hear Oracle say that it's still core technology, but it gets no attention beyond occasional bugfixes; certainly no new features.

1

u/ironcladfranklin May 14 '20

Jxbrowser. It has its own headaches but at least it's modern.