0
Nov 01 '20
[deleted]
9
u/marvk Nov 01 '20
What do you mean Java needs to choose?
Swing will stay available for backwards compatibility, but as far as I know there is no major ongoing efforts being put into Swing.
JavaFX on the other hand is being actively developed, but has always felt incomplete to me. I've used it for a multitude of projects and there are always roadblocks with bad documentation (especially for styling), incomplete APIs (like table column auto widths) and such. As much as I hate to admit it, I very much understand the appeal of Electron. Especially with a framework like Vue, UI development in the web is a breeze compared to JavaFX.
6
u/wildjokers Nov 01 '20
Then use Swing which is complete, very mature, and has great documentation.
-1
u/marvk Nov 01 '20
Sadly, it's not event driven, which makes it kind of a pain to create complex UIs. Have you used libraries like RxSwing? Can you recommend anything else that makes swing feel not as archaic?
5
u/wildjokers Nov 02 '20
Sadly, it's not event driven
What do you mean? Swing is absolutely event driven. Not sure how a GUI toolkit could even work without being event-driven. Event handling in Swing and JavaFX work the same way.
Swing doesn't feel archaic to me so I am not sure exactly what you are looking for.
0
Nov 01 '20
[deleted]
1
u/PartOfTheBotnet Nov 05 '20
Who are the maintainers of both Swing and JFX? Is there overlap? If there are two separate teams working on two separate projects I don't see a need to axe one.
JavaFX in my opinion really needs better publicity / community engagement. For any project to stay alive you need to have people actively using it, and people who actively create new content for it. We need more Dirk Lemmermann's to continue breathing fresh life and interest into the project. The more "wow, thats really cool" we see the better.
1
Nov 05 '20
Yes i agree 100% But this attention you will only get when you say Javafx is our main champion, swing gets dropped and javafx gets actual developement again
4
u/jokke150 Nov 01 '20
Maybe they should
1
u/AlternativeAardvark6 Nov 01 '20
I have only used JavaFX once and thought it worked pretty well. What would be a better way to make a gui for a Java application?
2
u/kozeljko Nov 01 '20
I think he means that GUIs shouldn't be built with Java at all. It certainly feels like they aren't gonna be super relevant anytime soon.
4
u/john16384 Nov 01 '20
I see no reason why you can't have multiple UI frameworks.
4
Nov 01 '20
Because java is very unsexy and slow to build guis with right now, and the little dev effort put into it shouldnt be split by 2
1
0
u/Bobby_Bonsaimind Nov 02 '20
"Java" cannot choose. Oracle has chosen, and they dropped JavaFX (well, they also don't allocate much to Swing either...well, they basically dropped Java now that their lawsuit against Google is through).
Swing is great, because it comes with the JDK, offers a lot of functionality and extendability and with LaFs also offers enough styling options.
JavaFX requires bundling, including native libraries (do we still need different packages per platform?), but offers more options if you require effects or 3D and offers easy styling. But its feature set is not so rich. The extendability of the default components is also questionable.
When JavaFX was added to the JDK it looked like it would actually be able to replace Swing. Then it was ripped out, and since then it kinda drifts. Swing is going nowhere, neither are the big applications that build on top of it.
10
u/static_context Nov 01 '20
Hi everyone,
I'm the author of EdenCoding and I just wanted to say thanks to everyone who's taken the time to visit it today. I'm hugely gratified that someone thought to share it (thanks, /u/mars-dev) and I hope you find it helpful.
JavaFX isn't perfect, and it has some weird-ass ways to 'help' you customise your UI, which frustrated me for years as I learned it (still learning...). I've tried to shape EdenCoding around the idea that most problems can be solved, but sometimes the solutions look complex or need to be explained in a certain way.
My future self is also a dumbass, so sharing visual guides with solutions to issues as I solve them pays off in the long term (the canvas article for example ... those custom graphics on how the canvas draws things are really just for me when I forget them later...)
I don't currently have a way for you to reach out on the website (working on it...), so please for now either reply here, or IM me if you have a suggestion for content you think would add value to the community. I have three kids and a full-time job, so I can't guarantee I'll write an article, but I'll do my darndest to reply to everyone.
I hope you all have a great day.
Cheers, Ed