When comparing Electron vs Java / Swing, the Slant community recommends Java / Swing for most people. In the question“What are the best cross-platform GUI toolkits?” Java / Swing is ranked 16th while Electron is ranked 23rd. The most important reason people chose Java / Swing is:
Swing is part of the Java API.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Healthy community
Github is behind electron and there is a lot of big companies using it to make their cross platform apps.
Pro Active development
Electron receives updates frequently (multiple times each month). For example, the recent updates (as of July 15, 2016) are:
1.2.6 (released July 6)
1.2.5 (released June 23)
1.2.4 (released June 22)
1.2.3 (released June 16)
1.2.2 (released June 8)
Pro learning curve is less
Electron has less learning curve when compare to qt like other options
Pro Great documentation
Electron has a nice website with great documentation. It also features a lot of samples.
Pro Solid API
Pro Part of Java
Swing is part of the Java API.
Pro Very good and powerful API
E.g. separate models.
Pro Powerful controls
E.g. JTable which works fine on every platform with very large row counts, e.g. 100.000+.
Pro Several look and feels available
Pro Easy to use
Drag and drop utility.
Cons
Con Apps can have memory issues
Apps made with Electron are likely to have memory issues unless you specifically design the app with efficient coding.
Con High CPU Usage
Electron Has High CPU Usage
Con Needs to run chromium
Runs chromium in the background which consumes a lot of resources.
Con Only for JRE-based languages
Con Bugfixes rely on Oracle
Con No real native look
Though the importance of the native look seems to have dropped the last years by the raise of in-browser-applications.
However, you can achieve native look and feel using UIManager.systemLookAndFeelClassName.
Con Severely deprecated
The system is ancient and Oracle has dropped support for it in favor of JavaFX
