GTK+ vs Java / Swing
When comparing GTK+ vs Java / Swing, the Slant community recommends GTK+ for most people. In the question“What are the best cross-platform GUI toolkits?” GTK+ is ranked 11th while Java / Swing is ranked 16th. The most important reason people chose GTK+ is:
Supports a lot of languages like Java, Javascript, C++, Python, Pascal, FreeBasic and Haskell, but support for languages like C# and GO is only partial.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Language bindings
Supports a lot of languages like Java, Javascript, C++, Python, Pascal, FreeBasic and Haskell, but support for languages like C# and GO is only partial.
Pro Nicer user interface when using PyGi
Creating cross platform enterprise apps with PyGi and with the help of Gtk Themes makes them look great.
Pro Working with GTK focused Vala is great
Vala is made to make GTK easy [as well as for other things] and it really does, and makes it easier than working with C/C++, Python, or any other,
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 Sucks for traditional applications
GTK3 added CSD widgets and added a lot of paddings to make widgets bigger for touchscreen use, GTK4 also even removed Menubar and Toolbar widgets.
Con No menuicons or mnemonics
Gtk3 has removed the support of icons and mnemonics making navigating menus just terrible for the use with a keyboard. Sure there are some hacks to make them working again but they will never work as they did/do work in Windows, GTK2 or QT.
Con Terrible integration
Looks and feels like an alien on all other platforms than GNOME.
Con Promotes Wayland as the standard X11 server on Unix
Lets face it, Wayland is not a replacement for XORG since Wayland works currently only in GNOME and there are many issues. Some desktops and window managers will never get ported to Wayland and it is not available to all Unix and Unix-like systems. X11 on the other hand is available for almost everything, so it will be available for the next decade or even longer.
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
