ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There are very few non-trivial languages that don't have at least some library/module/whatever to allow GUI construction. Pretty much any language you would be interested in will have a number of ways to construct GUIs. Regardless of the languages, some of the popular ones are wxWidgets, GTK+, and Qt (they are available for all sorts of langauges, like C, C++, Python, Perl, Ruby, Java, etc. If you are using .NET (C#, J#, L#, VB.NET, etc), there is Windows.Forms, and the JVM has Swing (Groovy, JRuby, etc.).
That really depends on your idea of better. If you mean in terms of usability, only the GUI developers can make it better or worse, not the GUI toolkit. If you mean simpler to program for, I would say Swing is slightly easier. If you mean performance, GTK+ would win just because it is native. Though Swing apps can definitely be very fast. Do you mean in terms of "built-in" functionality (like video support, etc)? Well, both provide a very basic UI, then depend on third party developers to create extensions to handle more complex UI components. Do you mean technically? Well, that is very subjective. Swing's event-driven model is much more intuitive. It directly follows from the Observer pattern. Thus, it is easier to extend and manipulate. Both can easily build very complex GUIs. Overall, I would say the choice to use one or the other depends much more on other, more external, factors. If you are building an app to run on the JVM, it makes sense to use Swing, since you don't have to rely on the GTK+ library. If you want the speed of GTK+ on Java, look at SWT instead.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.