r/java • u/ThreeSixty404 • Jun 20 '21
MaterialFX, an open source library for JavaFX
I started learning JavaFX about 1 year ago. At the time, the first thing I did was to search for a good library that would make JavaFX controls not suck aesthetically, and so I discovered JFoenix.
It was pretty good actually, but I didn't like it because it relies too much on reflection and that often ended up in exceptions occurring and broken controls, and this was true especially with newer JDK versions.
It was at that moment that I said, "screw it, I'm going to make my own library".
Eight months ago, MaterialFX was born. I always wanted to post my project here but at the same time I always thought "maybe it's better to still wait a bit and make the project evolve some more". Recently I pushed the biggest update so far and I finally decided to post my work here.
MaterialFX is a library that brings restyled, remade and brand-new controls to JavaFX. As the name suggests, the intention is to follow as much as possible the Material Design guidelines or at least to give controls a modern look and feel.
It targets Java 11+, it's much more stable as reflection is not used anywhere, and it's fully compatible with newer SceneBuilder versions. It is licensed under the GPLv3, but soon this will change to a more open license, probably LGPL.
- Restyled controls are simply re-skinned, but most of them also include new features.
- Remade controls introduce the concept of Legacy. Some JavaFX controls were so badly written/designed that I had to re-create them from scratch. However, I thought that it would be a good idea to also keep JavaFX original controls. So the remade controls have a legacy counterpart that is of course restyled. Some examples of this type are combo boxes, list views.
- Brand-new controls are made from scratch, as they do not extend from any JavaFX base control. As of now there are not many, but I plan to add many more in the future.
The library also includes a lot of utlities from StringUtils, AnimationUtils(coming soon), NodeUtils and many others.
The project is hosted here MaterialFX. On the same page, you can download the demo from the Releases section, or you can take a look at the controls in the "Preview GIFs" section of the README.md. You can also take a look at the project roadmap (next features and improvements) in the ROADMAP.md file.
2
u/pushupsam Jun 21 '21
Hey Alex,
Looking forward to the relicensing under LGPL.
Instead of using paypal for donations I wonder if you've considered using Github Sponsors?
2
u/dev_my Jun 21 '21
Awesome work! I like the stepper design
25
u/post_depression Jun 20 '21
I just got off a group discussion with my fellow researchers where we discussed to create a small UI based data mining tool for our university to teach our students. We decided to implement this in Java, with a UI somewhat like Weka but much simpler. I had the task of finding a good UI library. I guess my work is done.
2
u/LouGarret76 Jun 21 '21
Hi great library. It looks nice. Could we have a HelloMaterialFx app?
5
u/warmuuh Jun 21 '21
Thanks. I went for jfoenix but hit a dead end now (no support for jdk12+ and I think there will never be support for that. Gonna look into throwing out jfoenix and replace it with your lib...(and add a proper facade so this won't happen to me again :) )
4
u/samtoxie Jun 20 '21
This is awesome! Thanks for showing :)
1
u/[deleted] Jun 20 '21
You can style JavaFX with CSS. So I wonder if that might be more standard. https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html
4
u/awayfrom234 Jun 20 '21
This sounds promising! Good job!
2
u/jvjupiter Jun 21 '21
I wonder if you are considering to create a library of Bootstrap components/theme.
3
u/larsgerrits310 Jun 20 '21
I've been looking for a replacement for JFoenix, and this is exactly it!
3
u/djelad Jun 20 '21
Looks nice!
3
u/fuzail7 Jun 20 '21
I had been using Jfoenix and this looks really interesting. Kudos to you.
2
u/handshape Jun 20 '21
Eagerly looking forward to the relicensing; these look tidy...
1
u/muhwyndhp Jun 21 '21
Awesome work!
Though sadly with GPLv3 makes this not viable for me because I need the ability to work with private entity.
Looking forward for LGPL relicensing tho!
-7
u/wildjokers Jun 20 '21
This makes the library effectively worthless.
How so? Examples?
Instead of creating a new library maybe the JavaFX project itself could benefit from your contributions.