Even in the heydays of Java, desktop applications were never all that great. I remember how painfully slow Eclipse ran. And when I tried the WebStorm IDE a few years back, all the same problems still existed re memory management and some pronounced latency pressing a key and having the character appear on screen. WebStorm was also infamous for its code indexing runs, which pretty much froze my computer for a number of minutes. Not sure if that’s a Java problem though.
People criticise Electron, but honestly: applications like Slack, Spotify and VS Code run much better than the Java-based desktop apps that I got to use.
It's been used in place of applets a lot, but mostly because you could provide a complex application that opened in a new window with a click (assuming you dealt with the CA shenanigans).
It couldn't interact with DOM unless it accessed a browser over something like COM.
It's based on CheerpJ, a JVM that runs in the browser (using JS and Wasm).