Create a Java interface to work on all platforms

I am really confused about what to use. The options that I see are awt, Swing, and swt.

My question is, what should be the best for a Java desktop application on all platforms (Mac, Windows, and Linux) with minimal platform-specific code?

+3
source share
3 answers

AWT is deprecated, although some of its classes and design form the core of the Swing API.

Here is my approach to the differences between building apps in Swing and SWT:

Swing

  • + Forms part of the standard Java-SE platform, so fewer distribution headaches
  • + You can create a consistent look across platforms.
  • + , .
  • - , Swing , ; Swing look'n'feel, .

SWT

  • + ,
  • -
  • - , .
  • - - , SWT

SWT, . . - , .

Swing - , , , , , .

+5

.

AWT , SWT JRE ( ). Swing - (-ish) pure-java.

+5

Swing , , Java. , Swing , , , .

JSR Swing Application Framework, , , . fork , - GUTS, Google Guice . Netbeans Netbeans.

, "UI", , , Swing.

+1

Source: https://habr.com/ru/post/1758504/


All Articles