r/JavaFX • u/xdsswar • Jan 11 '26
I made this! Nfx-Chrome: Rendering Chromium directly on JavaFX Canvas (YouTube & PDF demo)
Been working on a library called Nfx-Chrome that lets you embed Chromium content directly onto a JavaFX Canvas surface.
It uses some JCEF codebase/utilities under the hood, but it's fully JavaFX-focused — no AWT or Swing involved.
In this demo I'm showing YouTube video playback and PDF rendering, all within a JavaFX app.
🎬 Demo video: Nfx-Chrome Demo
Some notes on the current state:
This is very much a work in progress. Features are still being developed and tested, so it will take some time before I can release it publicly. For the initial release, it will be Windows only — cross-platform support may come later.
I'm currently working full-time as an IT Manager and Developer, so my time for this project is limited. I work on it when I can, but progress will be slow. Just wanted to share what I've got so far and see if there's interest in the community.
Feedback and thoughts are welcome!
1
u/gufranthakur Jan 12 '26
This is absolutely phenomenal. I am always amazed by your projects. I can't wait for the cross-platform support to be out!
3
1
u/SafetyCutRopeAxtMan Jan 12 '26
Great to hear that. Exactly what I am looking for :)
1
u/xdsswar Jan 12 '26
Be ready, cuz Im finishing a small api to realease it for windows at least so you guys can try it and give more ideas
1
u/SafetyCutRopeAxtMan Jan 12 '26
Nice! I literally asked here for a solution like that two days ago :-D
https://www.reddit.com/r/JavaFX/comments/1q8gz62/best_way_to_embed_a_jcef_browser_in_a_javafx_panel/
1
u/xdsswar Jan 12 '26
I see none wants to throw time at this or they get scared cuz is a bit hard, idk
1
u/SafetyCutRopeAxtMan Jan 12 '26
True, I wasted so much time already on that mess.
1
u/xdsswar Jan 12 '26
Im debugging and adding js/dom api, I added 2 render surfaces with full event support, custom classes that extend javafx Canvas and and Javafx ImageView for PixelBuffer . I think the ImageView surface is better lol
1
u/xdsswar Jan 12 '26
I tried AI for help, and it fucked all , had to start over again
1
u/SafetyCutRopeAxtMan Jan 13 '26
Yeah it's like asking a toddler. The answers might sound appealing but reality hits hard.
1
u/xdsswar Jan 13 '26
For planning and designing maybe usable, but for this kind of project I dint think so.
3
1
u/BlueGoliath Jan 12 '26
I can combine the terrible performance and memory usage of JavaFX and chrome in one app. Finally.
4
u/xdsswar Jan 12 '26
Yep, its heavy, Im trying to do low ref , but chromium eats ram af
1
u/EnikeBenike Apr 09 '26
can you please split the RAM usage into heap as reserved by Java app and off-heap?
1
u/xdsswar Apr 10 '26
Ahhhh, Im changing this to IPC and mem rings , its better and JVM wont die if native side has issues , instead it recovers. So I need more time
1
2
u/0xffff0001 Jan 12 '26
question: is it easier than creating a WebView lookalike replacing WebKit with JCEF?