https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
d

Didier Villevalois

07/18/2022, 2:02 PM
Hi all! In the Swing Interoperability examples (https://github.com/JetBrains/compose-jb/tree/master/tutorials/Window_API_new#swing-interoperability), it is shown how to open an AWT file dialog. I see that there is a
window
in the
FrameWindowScope
of the
Window
composable, but is there a corresponding ambient?
k

Kirill Grouchnikov

07/18/2022, 2:19 PM
No, that ambient was removed some time ago
d

Didier Villevalois

07/18/2022, 2:34 PM
OK I created mine... Thanks. Side question, I am fighting with Swing. Does someone knows how to: 1. show the dialog in the front (On the second dialog opening, it appears behind the ComposeWindow.) 2. position the center of the dialog in the center of the ComposeWindow (The best I was able do is having the dialog's top-left in the center of the ComposeWindow.) (Also the call to
onCloseRequest
in the implementation of
setVisible
is really counter-intuitive.)
7 Views