I'm trying to place some compose UI on top of a JC...
# compose-desktop
m
I'm trying to place some compose UI on top of a JCEF browser shown on a
SwingPanel
. Unfortunately it does not work because as stated in the documentation, SwingPanel is on top.
Copy code
The Swing component is placed on top of the Compose layer (that means that Compose content can't overlap or clip it).
Any ideas of how to circumvent this limitation?
2
Following this idea https://github.com/JetBrains/compose-jb/issues/1521 I'v able to add a composable over a SwingPanel, but I cannot make the background transparent because of this https://github.com/JetBrains/compose-jb/issues/147
d
This sums it up well:
They didn't fix the issue of rendering compose over a SwingPanel. They just made a semi informative page about it and said literally "or stop using the SwingPanel and still try to implement the missing component, thereby contributing to the development of technology and making life easier for other developers.".
haven't seen any indication that they plan on trying to fix it
So there's no good way to display a web view in Compose at all
I've been very jealous of an acquaintance writing a rival desktop application (in Rust) to my Compose one because he can use Windows's WebView2 whereas I'm bundling the full 200MB JCEF with mine and it randomly stops working.
Of course I could write JNI bindings to try and do the same, but the amount of effort that'd take that I could put into other app improvements means it's not happening.
146 Views