7
//I'm totally new at apps with GUI , please bear with me :)

I'm writing a new stand alone (meaning , no client/server) application in Java. I'm trying to decide if I should use SWT or GWT .

GWT seems to be very agile and have more capabilities (so says our UI designer) , but I find it hard to wrap my mind about using web tools for a non-web application

SWT seems like a more logical choice top me only because it's not web oriented

(Then again , these reasons might be totally irrelevant )

What do you think?

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Yossale
  • 14,165
  • 22
  • 82
  • 109
  • 1
    Maybe you should additionally have a look into the [Rich Ajax Platform](http://www.eclipse.org/rap/), which allows you to run an application both on the desktop (SWT), as well as on the web (RWT). – Chris Lercher Nov 08 '10 at 11:02
  • @ChrisLercher RWT now stands for Remote Application Platform – Zakaria Aug 25 '15 at 10:42

2 Answers2

14

You appear to be confused. GWT is strictly for developing web apps. You cannot use it to build a regular desktop GUI.

If you want to write a regular Java GUI, your choices are

  • SWT
  • Swing
  • JavaFX

See e.g. these questions for a comparison:

Java Desktop application: SWT vs. Swing

JavaFX or Swing?.

Community
  • 1
  • 1
sleske
  • 81,358
  • 34
  • 189
  • 227
  • 2
    I would not recommend anybody to use Swing anymore because it is no longer maintained. You should either use SWT (which is still maintained but [not very actively developed](http://ohloh.net/p/swt) ), or [JavaFX](http://www.oracle.com/technetwork/java/javafx/overview/index.html), which brings lots of new features and is prepared for Java 8. – Max Hohenegger Oct 31 '12 at 08:36
  • @MaxHohenegger: Well, Swing is used in many apps (especially inhouse), so it won't go away anytime soon. But yes, it currently looks like Oracle wants to replace it with JavaFX, so for new projects Swing should only be used if there are clear advantages (such as useful custom Swing components you can build on). Anyway, good point about JavaFX, I added it to the list. – sleske Oct 31 '12 at 10:48
2

GWT applications run in a browser, so there is definitely a "server" component, so you should ignore it.

What you mentioned are Java technologies. In that space, the two big players are SWT and Swing. I'd suggest you choose one of them, but know that Swing is older, and therefore more documented. If you want to play it "safe", choose Swing.

darioo
  • 46,442
  • 10
  • 75
  • 103
  • 1
    As an SWT user I would say it is better, but I agree that documentation is better for Swing. You can also rely on Swing being present on any setup with a JVM, whereas SWT you will have to provide the libraries and native binaries, which can greatly complicate deployment. It will also complicate testing as there are some cross-platform issues. – ZoFreX Nov 19 '10 at 10:56