Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GUI for a Java stand alone app. Should I use SWT or GWT?

//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?

like image 380
Yossale Avatar asked Nov 08 '10 09:11

Yossale


People also ask

What is the difference between SWT and Swing?

SWT and Swing are different tools that were built with different goals in mind. The purpose of SWT is to provide a common API for accessing native widgets across a spectrum of platforms. The primary design goals are high performance, native look and feel, and deep platform integration.

Which is better JavaFX or swing?

In short, Swing and JavaFX are both GUI toolkits for Java programs. Swing is the old standard toolkit that features a bigger library of GUI elements and mature IDE support. JavaFX is the newer standard with a smaller library, more consistent updates, and consistent MVC support.

Is Java Swing still relevant?

Swing and AWT will continue to be supported on Java SE 8 through at least March 2025, and on Java SE 11 (18.9 LTS) through at least September 2026.


2 Answers

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?.

like image 185
sleske Avatar answered Sep 23 '22 20:09

sleske


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.

like image 40
darioo Avatar answered Sep 19 '22 20:09

darioo