There are at least two GUI toolkits that run on TeaVM: 1. Codename One. Similar to swing, but focused on mobile https://www.codenameone.com 2. SnapKit. Targeted at desktop. Also a light-weight toolkit, like Swing. https://github.com/reportmill/SnapKit
It could work though by drawing to canvas.
That's what Avalonia does in C#: https://avaloniaui.net/
Here's a clone of Visual Basic 6 written with Avalonia and compiled to WebAssembly:
I made a general guide for migrating from Swing to TeaVM here: https://frequal.com/TeaVM/migration/MigratingFromSwingToTeaV...
For a more specific example, I ported an open-source Java applet and described the process here: https://frequal.com/java/RestoringA19YearOldGameWithTeaVm.ht...
I think TeaVM is more focused on letting you share code with the web instead of porting entire apps.