How can I move a window to front?
# compose-desktop
a
How can I move a window to front?
c
you can get access to the underlying
JFrame
which you should be able to call
moveToFront()
on or
toFront()
my swing is non-existent unfortunately 😞
s
whenever you don't know how to do something, look how to do it in Swing 😄
k
Swing forever!
a
TIL. So it’s swing underneath? I kept searching for it as ‘AWT’ because of the packages. Never did swing in my life so i was searching blindly so far
s
It's "around", not underneath 🙂 Compose renders with a different stack (Skiko), but the windowing is still handled by Swing
s
Little did my Uni teachers know when they said Swing is dead and we learned JavaFX instead. Would’ve had a head start with CFD if we did Swing instead 😅
k
Swing is dead as it's not being actively moved forward to keep up with times. JavaFX is the tree that falls down in the middle of the forest and nobody's around to hear that sound.
Swing is 90% fine still to develop on top of, until you get to the corners where it starts hurting because nothing's been happening for the last 12 years in there
Things like kerning, variable fonts, windowing APIs, integration with the system tray and notifications, dark mode, auto start with OS, etc
s
Isn’t it interesting that afaik all the JetBrains IDEs are built on top of Swing though? Of course I’d imagine with a lot of Jetbrains touches on it, but still. Or am I possibly wrong on this assumption about the JB IDEs?
k
And that's why they're all shipping with the JetBrains Runtime that addresses all of these gaps and more for proper desktop integration
s
I see, so it’s definitely the JB touch on top!
Does this mean that Swing was (is?) part of the JDK itself? Is this why they need their own fork of it to make such fixes?
k
Swing is part of the JDK. Getting fixes into the mainline JDK tree would require proper amount of attention to the core Swing / AWT developer experience, something that was abandoned long time ago.
s
I see, this makes total sense then! So, CFD does not benefit from these fixes since we’re not running on Jetbrains Runtime. But I suspect this isn’t a problem since as mentioned above, the Swing parts are only for Window management, and Compose + Skiko can do everything that’s needed in the content of the window itself right? If yes, and I understood correctly, does this feel like a potential problem for the future of CFD and its adoption for more big and serious projects?
And as a side-track, I always wondered why Jetbrains Fleet is not built on CFD, could Swing being basically abandoned and CFD relying on it have played a role in that decision? Maybe at this point I’m just thinking out loud and you don’t have the answers to all this, but if someone does and sees this I’d love to learn more about it.
k
It takes time to move even one big project to a different toolkit and architecture, and to reorient even one team of developers.
s
The tl;dr is "when Fleet was started, CfD did not exist"