For "best" I intend that the code shouldn't need, or need very few, platform specific tweaks.
-
14Downvoting is a little harsh. Just not upvoting it would have been sufficient, methinks. – Andrew Rollings Dec 23 '08 at 15:02
-
@Tom Hawtin - tackline--I agree; another good reason to downvote the question. – Onorio Catenacci Dec 23 '08 at 15:02
-
7Gotta agree with Andrew: downvoting this question is a bit harsh imho. – cletus Dec 23 '08 at 15:04
-
"Which is best" is not far from being unanswerable--adding the "in terms of code changes" caveat doesn't improve it much. I stand by my down vote--this kind of question shouldn't be rewarded with higher rep. – Onorio Catenacci Dec 25 '08 at 02:11
-
http://stackoverflow.com/questions/234075/programmer-jokes-whats-your-best-one/236736#236736 – Bratch May 18 '09 at 14:10
11 Answers
I strongly recommend Java for cross-platform GUI development. In particular, I recommend the GUI builder that comes with the Netbeans IDE. It's very simple and very powerful. You can point and click and drag and drop to create a GUI, and easily customize the actions which various buttons and other components take.
I much prefer Python as a language, but none of the free tools for GUI development come anywhere close to this, and the same thing seems to be true for the other languages I've used. (I should point out that QT has wonderful GUI developers for various languages such as C and Python, but it's only free when used on open source projects.)
EDIT: QT has recently been relicensed as LGPL, so you're free to use it in commercial applications. The Python bindings for this (PyQT) have not been re-licensed, but another project called PySide has been created to provide Python QT bindings.

- 186,300
- 67
- 213
- 256
-
1I also recommend Netbeans. Its GUI Designer is so great I can compared it with Visual Studio. – Gant Dec 23 '08 at 15:12
-
1How good is it compared with Intellij Idea? I've heard very good things about NB, but I haven't found a direct comparison with IDEA – OscarRyz Dec 23 '08 at 20:07
-
I've never tried out IntelliJ because of it's non-free nature, so I'm not sure, although I've also heard excellent things about it. – Eli Courtwright Dec 26 '08 at 22:34
-
@Eli - Does the end user need to install Qt on their system in order to run an application developed with Qt? – Usagi Aug 13 '12 at 21:30
-
@Usagi: Depending on how you deploy your application, a user wouldn't necessarily need to install Qt separately, since you could bundle it with your application. – Eli Courtwright Aug 14 '12 at 14:27
-
@EliCourtwright , Do you still recommend to make gui app with java now? – Rajanboy Jun 17 '22 at 17:50
-
@Becauseihatemyself: I've moved to developing webapps rather than desktop GUI apps, both in my career and in my personal projects. While it does require a server, it avoids a lot of "dependency hell" issues. – Eli Courtwright Jul 04 '22 at 22:11
I personally despise the whole concept of emulating the native GUI that is where the Java GUIs are rooted. Instead of being at home wherever you go, it makes you a tourist everywhere, often needing an interpreter. The Eclipse GWT is a better toolkit that makes much better use of local resources, but it still holds that people love to write Java code, and hate to use Java applications, think of it: which Java applications you love on your desktop?
Tk is just as ugly and limited on any operating system you choose to run it onto, and the same goes for Qt, in my opinion.
Mono would need a good try, as it is a way to answer the question "why Linux sucks", if you remember that old post bi Miguel de Icaza. Mono comes with a mature set of widgets and Apis and does not try to limit what you can do in order to give you portability.
Silverlight is close to portable and has a great interface definition language, but lacks access to the system, you have to split the application between a server and UI even on the same machine to overcome it.
Adobe AIR is a dog and local system acces is not easy.
If I am able to choose, I tend to avoid GUIs altogether and try to use a web server, even a local web server, and Json, JQuery and all that stuff. I found out that I can have many more choices and am more productive than with native widgets. This combines the strengths of the use of a real language server side and the wonderful disordered geniality of JavaScript in the GUI.

- 1,816
- 1
- 18
- 27
Yes: use Eclipse RCP. You can write not only cross-platform, but e.g. multilingual applications with it. SWT provides the native look-and-feel for multiple platforms and windowing systems.

- 21,755
- 5
- 88
- 103
So as I understand it, there is currently NO truly cross-platform high level language & GUI toolkit right now.
Java is cross-platform, GUIs in both SWT and Swing can look good, when you really try hard to tweak them pixel-precise and provide modifications to the look to supported platforms. There are currently some good GUI designers, but nothing as great as OpenStep 15 years ago.
QT is now LGPL'ed so long as you only link to it dynamically. Well but QT has its own set of problems and is a superset of C++. You have to compile against QT-hacked compiler, not the generic C++ one.
didn't try the wxWidgets, but from the looks of it, it can work, but is NOT high level toolkit at all!
There seems to be an option to write in C# and opensourced .NET and run it via Mono in other platforms than Windows... Didn't try, but it seems to me, that is just porting Microsoft on other platforms.
There is GNUstep, but for now it looks for me, like it is only developped by some opensource geek fans. It would be really interesting to see the OpenStep stack outside of the Mac OS X, but for now this looks to me as not viable.
Even Java, while it is self-contained, does not currently provide great GUI designer capabilities. I used the GUI designer tool once when starting to learn how to code with SWT, and now I find myself coding it by hand, which is really not bad, but it really should not be necessary. But that was few years ago, I will have to try again.
You can of course create your cross-platform application core and service code in one language (Java, or C/C++ if you want speed), creating something like a server or unix tool and just connecting to it from the GUI that you create on each desired platform using its own tools. The result is that the GUI is platform native, taking advantages of the features of the platform, and should be fairly simple to create for each desired platform. (Cocoa on Mac and .Net on windows provide rich features for the platform they are native to).
We will have to look into the robustness and matureness of such ideal solution. It should have good commercial and comunity backing and be fairly evolved right now, so as the future implementations of such tools will provide us with more than the mere LOWEST COMMON DENOMINATOR for all the supported platforms, but to leverege the cross-platform tools to include and adopt well-designed concepts and rich features native to the relevant platforms and distribute them cross-platform.
Only than can be cross-platform development truly viable and adoptable in great numbers.
Suggestions?
-
1
-
"QT is now LGPL'ed so long as you only link to it dynamically. Well but QT has its own set of problems and is a superset of C++. You have to compile against QT-hacked compiler, not the generic C++ one." Huh?!?! Qt is a set of C++ libraries. Do not confuse qmake with a compiler please. Qt libraries alone can be build from source with gcc, visual c++ etc. compilers and accordingly can be used with any application compiled with those. I didn't bother reading the rest of your post because of this nonsense... – rbaleksandar Aug 08 '15 at 00:36
-
Java is certainly nice, but I've been doing just fine with Python and Qt via PyQt4 lately. I find that I get things done faster than I did in Swing or SWT, too.
So far, no platform-specific tweaks have been necessary, and Qt4 widgets look nice on different platforms. The Qt GUI builder is very nice, and using Python has enabled easy integration with some other cross-platform frameworks (notably VTK, scipy-cluster, and some SWIG-wrapped objects for interfacing with files output from a performance tool).
Note that Qt is not free unless you use it on open source projects.

- 58,354
- 15
- 89
- 96
As long as someone defines "platform independence" correctly, Java is the best.
Some people argue that C# is the best, but those people seem to misunderstand the term "platform independence" ;)
Note: I refer to the fact that C# is ported to Linux/Unixes only as long as Microsoft and Novel keep up their treaty. The community itself would never be able to maintain such huge platform as .NET

- 19,113
- 27
- 81
- 100
I would also consider Mono as serious contender for platform independence and a good IDE tool. Java's performance sucks on the desktop. Just check http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx

- 1,625
- 17
- 15
-
With regards to java applications start up time: nice to have but you do really need your application started in 15 ms ? I think that 1/10 of second is fast enough... There is always a possibility to compile java code to native code. – digital_infinity Apr 03 '13 at 11:15
These days there are many languages that allow you to create cross-platform GUI applications efficiently. Java, Python, Tcl/tk, C#...
I think you need to define the requirements of your application a bit more, for instance:
- Will the UI be Web-based, or desktop-based?
- Is the application going to be a large or a small?
- Will it feature some sort of "extension" feature (e.g. plug-ins)?
- Will it function over a network, and is it likely to be distributed/load balanced?
The list can go on forever, work out the defining points about your application, and start researching the language based on the whole.

- 17,426
- 15
- 71
- 93
For native binaries, wxWidgets is a convenient solution.
I would tell you that is even better than Java for the user experience side. Even though you can make the presentation layer look pretty much the same for all platforms in Java, they all look like Java. On the other hand, wxWidgets make the user feel like a platform specific build (and it is, indeed), but you can use the same code to compile for several platforms (at least the major ones).

- 1,943
- 1
- 16
- 25
I would think that it depends on what kind of platforms you plan on targeting. Java will have the most platforms with a VM. However, if you just want to use Windows and Linux, you can use C# (using mono on linux).

- 2,252
- 6
- 22
- 27
-
First confirm that you can get, and continue to get, Mono for any platform you customers might wish. Many major distros don't supply anything past Mono 1.2 or 1.9, with Ubuntu 9.10 and SUSE as exceptions. – NVRAM Nov 02 '09 at 19:13
Based on your definition, no. Even wit the newest graphical libraries you can expect to do a bunch of testing on different platforms.
Flash would probably be the best. Wide spread and better at looking the same across different platforms.

- 494
- 3
- 9
-
I’m not sure about today’s Flash’s performance but some years ago scrolling a list that was several thousand pixels high was anything but fun. :) – Bombe Dec 23 '08 at 15:05
-
Some years ago Java GUIs used to be pretty terrible too. Hardly a useful fact, several versions and a generation or two of hardware later. – Mr. Boy Jun 03 '10 at 11:10