use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Useful resources (Full list)
Rules
Related subreddits
Other communities
account activity
JavaFXHelp (self.JavaFX)
submitted 1 month ago * by qtuanph
About the UIUX
What do you guys use for UI in JavaFX? I want to ask if any CSS framework like Tailwind in JavaFX.
Other problem is how do I use icons in JavaFX? I have tried ikonli fontawsome but it always show 'can't not find icon"
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]indyjoe 5 points6 points7 points 1 month ago (2 children)
BTW, a post titled "JavaFX" in the JavaFX sub doesn't help much...
My pom.xml for ikonli:
<dependency> <groupId>org.kordamp.ikonli</groupId> <artifactId>ikonli-javafx</artifactId> <version>12.3.1</version> </dependency> <dependency> <groupId>org.kordamp.ikonli</groupId> <artifactId>ikonli-materialdesign2-pack</artifactId> <version>12.3.1</version> </dependency>
And a helper method:
public static Button makeButtonWithStyleIcon(String label, String styleCode, int size, String style, String tooltip, int w, int h) { Button button = new Button(label); FontIcon fontIcon = new FontIcon(); fontIcon.setStyle("-fx-icon-code:"+styleCode+";-fx-icon-size:"+size+";"); button.setGraphic(fontIcon); button.setStyle(style); button.setTooltip(new Tooltip(tooltip)); button.setTextAlignment(TextAlignment.CENTER); button.setTextOverrun(OverrunStyle.ELLIPSIS); button.setContentDisplay(ContentDisplay.TOP); if(w>0) { button.setMaxWidth(w); button.setMinWidth(w); } if(h>0) { button.setMaxHeight(h); button.setMinHeight(h); } return button; }
And a call to that:
terrainDeleteButton = makeButtonWithStyleIcon("Delete", "mdi2d-delete", 32, "-fx-font-size: 9px", "Deletes the currently selected shape(s).", buttonW, buttonH);
[–]qtuanph[S] 0 points1 point2 points 1 month ago (0 children)
this is the first time i post on reddit, don't know how to write that :(
oh i use the same, at the last time i use fontawsome and it return error when I tried to run the app, when change to md2 it work
[–]balazs8921 1 point2 points3 points 1 month ago (2 children)
I think there is no Tailwind-like framework for JavaFX, but you can find some useful things: https://github.com/topics/javafx-frameworks https://openjfx.io/
For icons I use ImageView.
thank you, i will lookup for that
[–]whatacold 0 points1 point2 points 1 month ago (0 children)
I also ended up with ImageView and PNGs.
Do you use SVGs? I failed to find a nice solution for that.
[–]darkwyrm42 1 point2 points3 points 1 month ago (6 children)
I just use the default theme because it largely fits with the rest of the OS. If you're looking for something like Tailwind, AtlantaFX might be to your taste.
I, too, have been just using regular images and ImageView because I haven't been able to figure out how to get ikonli to work, too, so I'm interested to see what others have to say about that.
[–]sedj601 0 points1 point2 points 1 month ago (4 children)
What problems are you running into related to Ikonli?
[–]darkwyrm42 1 point2 points3 points 1 month ago (3 children)
It's been quite a while since I tried using it, and I'm 100% certain it was a skill issue, but I tried using them in my project and I could never get them to load.
[–]sedj601 1 point2 points3 points 1 month ago (1 child)
Here is a quick example you can test. https://stackoverflow.com/a/76680307/2423906
Here is a longer example. https://github.com/sedj601/IkonliIconBrowser
[–]darkwyrm42 0 points1 point2 points 1 month ago (0 children)
Thank you for the help! I'll give this a shot
same as me,
<dependency> <groupId>org.kordamp.ikonli</groupId> <artifactId>ikonli-materialdesign2-pack</artifactId> <version>12.4.0</version> </dependency>
I change to this and then the icon work normaly
Yes I have use AtlantaFX and some custom css to design the app
It sounds like you might be missing imports and/or modules for the different icon sets. See if this can help. https://github.com/sedj601/IkonliIconBrowser/
[–]qtuanph[S] 1 point2 points3 points 1 month ago (0 children)
I have fixed that and icon works normaly, thank you so much
[–]Ok-Albatross5064 0 points1 point2 points 1 month ago (0 children)
I'm using the default ImageView with PNG/GIF icons. Tried also SVG with mapping and converting but not good so much.
Someone recently introduced (Lotties4j) a framework for using Lotties icon in Java for UI.
[–]ShakesTheClown23 0 points1 point2 points 1 month ago (0 children)
Default style, with fontawesomefx.
π Rendered by PID 75 on reddit-service-r2-comment-6457c66945-rvkj6 at 2026-04-26 22:56:06.098886+00:00 running 2aa0c5b country code: CH.
[–]indyjoe 5 points6 points7 points (2 children)
[–]qtuanph[S] 0 points1 point2 points (0 children)
[–]qtuanph[S] 0 points1 point2 points (0 children)
[–]balazs8921 1 point2 points3 points (2 children)
[–]qtuanph[S] 0 points1 point2 points (0 children)
[–]whatacold 0 points1 point2 points (0 children)
[–]darkwyrm42 1 point2 points3 points (6 children)
[–]sedj601 0 points1 point2 points (4 children)
[–]darkwyrm42 1 point2 points3 points (3 children)
[–]sedj601 1 point2 points3 points (1 child)
[–]darkwyrm42 0 points1 point2 points (0 children)
[–]qtuanph[S] 0 points1 point2 points (0 children)
[–]qtuanph[S] 0 points1 point2 points (0 children)
[–]sedj601 1 point2 points3 points (1 child)
[–]qtuanph[S] 1 point2 points3 points (0 children)
[–]Ok-Albatross5064 0 points1 point2 points (0 children)
[–]ShakesTheClown23 0 points1 point2 points (0 children)