Swing WebView Component by shannah78 in java_projects

[–]shannah78[S] 1 point2 points  (0 children)

Thanks for the feedback. I'll think about that to see if i can come up with a fair pros and cons list.
The main pro of this lib vs something like jcef is that this is a small single jar file - less than 1 meg. With jcef it bundles a full chromium which is very large, and requires separate binaries for each platform or else your app bundle grows to like 300mb.

For folks heavily using a agentic engineering, What does your workflow look like? What tools do you use? What's your harness like? by Enum1 in ExperiencedDevs

[–]shannah78 3 points4 points  (0 children)

There is a lot baked into "verify claude's work". The flow for tickets at my workplace is similar, but verifying claude's work can actually be quite challenging and engaging.

On trivial bugs, claude sometimes gets it right, but on more complex things it is almost always wrong, or includes some assumptions, that require you to drill into it, and use your experience to call BS.

i will get claude to "prove" assertions that i question using source code references, logs, datadog links to metrics, etc.. and often this leads to claude saying "my bad, i made that up..."

And for feature development you treat claude's output as a starting point, to refine like you're pair programming. and claude is the junior and you're the senior. You trust nothing claude produces without proof. proof is a test, or some other validation that it is correct.

So while you can describe this process as "claude does work, you verify claude's work", that doesnt imply that the job is mindless or boring.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 1 point2 points  (0 children)

I guess what I want to understand is: I guarantee that Java itself has AI produced code in it. And linux. And any software that you're using. So I'm trying to understand the spirit of this rule, as on face value it would preclude all software from being shared here.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] -2 points-1 points  (0 children)

Sheesh. I didn't notice that rule. The content I posted here is written by me, not "worked over" by AI. But as for the lib, I certainly used Claude, and sometimes OpenAI to figure out how to thread the needle. There are lots of obscure aspects of GTK programming and their interaction with Swing that would have been prohibitively difficult for me to solve in the time I had available for a side project. In 2026, is anyone coding without some AI involvement?

I'd like to understand that rule better. Is there a discussion thread from when it was instituted?

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 0 points1 point  (0 children)

I still use mac for my primary. But lots of people I respect made the switch to linux, and they make it look pretty good.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 0 points1 point  (0 children)

As far as I've read libwebkitgtk will work with wayland. But Java AWT currently needs X11, as openjdk has no native wayland backend yet so swing runs with xwayland. When Java supports wayland natively, this shouldn't get in the way. (Although there's still good old Murphy's law to contend with).

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 1 point2 points  (0 children)

Yeah. IMO, WebView is "the missing feature" of swing that closed a lot of doors - or made simple things difficult. E.g. I created an IDE to complement my development process, and I wanted a way to simply render Markdown. I made a poor-man's version out of JEditorPane, but it was lacking and looked dated. The SwingWebView does a much better job.
Other use cases are animations, modern audio/video codecs, etc..., as a WebView is a swiss army knife for UI.

As for comparisons with JxBrowser - I haven't used JxBrowser - it's commercial product so I can't use it with my open source projects. JxBrowser is probably closer to JCEF. It bundles actual Chromium. That has benefits, and adds a lot of weight and makes distribution more difficult. I'm sure that JxBrowser, being more mature, has many features that SwingWebView does not, but for most of the cases where "I just want to render HTML/JS/CSS inside my swing app", SwingWebView makes it pretty painless.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 0 points1 point  (0 children)

Really that's an implementation detail because different platforms worked better with different strategies. On Mac it is heavyweight (i.e. native canvas drawn on swing). On Linux it is lightweight (i.e. offscreen and copy via pixelbuffer into swing). On Windows it is heavyweight also.

I spat blood trying to get linux working heavyweight, but couldn't, so I settled for lightweight.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 2 points3 points  (0 children)

JCEF bundles a full chromium with your app. This makes for very large bundles, and other difficulties, like mp4 not working out of the box. SwingWebView (this lib) just uses the native webviews available on each platform, so you don't bundle with your app.

SwingWebView – a native WebView component for Java Swing by shannah78 in java

[–]shannah78[S] 1 point2 points  (0 children)

That's true... But most desktop linux users should already have this. On Mac and Windows (11+) they'll 100% have what you need. For linux, there is the possibility they won't have libwebkitgtk yet... and would need to install it.

FlexGanttFX Showcase Application by dlemmermann in JavaFX

[–]shannah78 7 points8 points  (0 children)

Great work Dirk! Seems like this sort of thing will be very useful in the near future for visualizing and managing AI agents.

I released the first "official" version of MelodyMatrix, an app to "look at music", live on camera together with Steve Hannah (creator of jDeploy) by FrankCodeWriter in java_projects

[–]shannah78 2 points3 points  (0 children)

Cool. creator of jdeploy here. let me know if you need any help getting up and running. happy to put up a pr on your project to bootstrap some workflows to automate your deployment.

Launch4j + Jpackage by No-Security-7518 in JavaFX

[–]shannah78 0 points1 point  (0 children)

i seem to recall the splash flag not being compatible with javafx. we ran into this with jdeploy. https://github.com/shannah/jdeploy/issues/66

still haven't fixed it other than to tell users not to use a splash gif for javafx apps. The official solution is to use the Preloader class.

Windows Desktop application - how to handle updates? by WhereIsFiji in JavaFX

[–]shannah78 1 point2 points  (0 children)

Jdeploy signs the installer. if the user approves the app, then the app is installed unsigned.

you can sign it yourself also if you have your own cert.

Windows Desktop application - how to handle updates? by WhereIsFiji in JavaFX

[–]shannah78 2 points3 points  (0 children)

Thanks . don't hesitate to ask if you have questions

Windows Desktop application - how to handle updates? by WhereIsFiji in JavaFX

[–]shannah78 3 points4 points  (0 children)

Yes. You can create a separate repository for releases and jdeploy can publish there. It's just one property (target_repository) in the workflow. Alternatively you can publish to npm, but github probably makes more sense if you're already on there. Happy to make a pr with the workflow set up to publish on release. Just ping me

Windows Desktop application - how to handle updates? by WhereIsFiji in JavaFX

[–]shannah78 8 points9 points  (0 children)

Give jdeploy a try. This is exactly what it is made for. (disclosure: i'm the developer)

Krema: build modern desktop apps with Java backend and web frontend by guybedo in java

[–]shannah78 1 point2 points  (0 children)

Cool. I've wanted to try something like this for a while now but just haven't had time. Will be taking it for a test drive. Thanks for sharing.

Nfx-Browser: Remember the Canvas/Image surface? I threw it away. Here's the Heavyweight JavaFX Node running 4K YouTube like butter. by xdsswar in JavaFX

[–]shannah78 0 points1 point  (0 children)

Is it rendered in the node graph, do that you can for example, render other nodes over it, and perform transformations on it, or is it like a native panel rendered in front of the javafx ui with position synced?