Java GUI Development: SWING vs. Other Libraries

Click For Summary

Discussion Overview

The discussion focuses on the various APIs and libraries available for creating graphical user interfaces (GUIs) in Java, specifically comparing SWING, AWT, and other technologies. Participants share their experiences and preferences regarding GUI development, touching on historical context and current practices.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants advocate for using Java AWT, suggesting it may be suitable depending on the project.
  • Others argue that SWING remains relevant despite its age, as GUIs have not drastically changed in application development.
  • There is a mention of SWT and JFace being used by specific groups, such as Eclipse IDE developers, for a more OS-native experience.
  • One participant expresses a negative view of AWT, citing its historical deficiencies and platform dependency compared to SWING.
  • Several participants highlight the advantages of SWING, including its consistency across platforms and the availability of GUI designers in IDEs like NetBeans and IntelliJ.
  • A caution is raised against mixing AWT and SWING components due to potential issues.
  • Some participants reflect on the decline of AWT usage over the years, noting that most Java developers now prefer SWING.
  • There is a discussion about the differences between Java GUI development and Android GUI development, indicating that they are not directly comparable.

Areas of Agreement / Disagreement

Participants generally agree that SWING is a preferred choice for Java GUI development, but there are competing views regarding the use of AWT and other libraries. The discussion remains unresolved regarding the best approach for different types of applications.

Contextual Notes

Some participants mention the historical context of AWT and its decline, while others emphasize the importance of understanding the differences between desktop and mobile GUI frameworks. There are also references to specific IDE features and potential dependency issues that may arise.

levadny
Messages
32
Reaction score
16
Dear friends!

Please explain me what API/Libraries uses in Java for create graphic user interface. I use SWING but I hear that SWING is oldest technology. What you uses?
 
Technology news on Phys.org
It really depends on what you're building but you might start with Java AWT.
 
  • Like
Likes   Reactions: jedishrfu
Swing is still the thing. It's been around but GUIs don't really change that much on the application side. A smaller group of programmers have used SWT and JFace (most notably the Eclipse IDE developers its more OS native like)

Some folks have branched into web technology in which case its most likely html+css+javascript or a javascript ibrary like ExtJS or more recently Elm.
 
I'm not a fan of AWT. Historically, Swing replaced AWT because deficiencies in it its GUI programming model. I think it was too geared toward MS Windows technology.

http://stackoverflow.com/questions/408820/what-is-the-difference-between-swing-and-awt

From this article it says Swing is more of a pure java GUI. Its the same across platforms vs AWT which changes from platform to platform.

Also for Swing, there's a nice GUI designer in Netbeans that uses drag and drop to create your GUI design. You then wire in the code behind the GUI which gets trickier. I've seen some programmers at work really do some amazing stuff with it.
 
  • Like
Likes   Reactions: Borg
jedishrfu said:
Also for Swing, there's a nice GUI designer in Netbeans that uses drag and drop to create your GUI design. You then wire in the code behind the GUI which gets trickier. I've seen some programmers at work really do some amazing stuff with it.
IntelliJ has something similar but you have to be careful with the dependancies. Sometimes the IDEs create dependancies on their own jars when you use certain features.
 
Ok. Thanks a lot for all.
I start learn Java GUI from AWT. After study SWING. And it's all.
I use java only for Win application. May bee after for android in future.
 
One caution is to not mix AWT with Swing components as youll run into a lot of odd problems.

Also Swing is a richer set of components that look the same no matter where your app runs ie windows or macosx or linux.
 
  • Like
Likes   Reactions: levadny
We used to utilize AWT more than ten years ago, to create some fancy applets. It is not used anymore by the vast majority of Java developers. Swing is still the thing as jedishrfu points out. You can start right from this in my opinion and I recommend this title https://www.amazon.com/dp/0596004087/?tag=pfamazon01-20 by OReilly publishing and of course the standard documentation from Oracle, for updated and full info. When it gets to create an interface for an app for the web, it is best to mix and match technologies and this includes Java frameworks as well.
 
Last edited by a moderator:
  • Like
Likes   Reactions: levadny
levadny said:
Ok. Thanks a lot for all.
I start learn Java GUI from AWT. After study SWING. And it's all.
I use java only for Win application. May bee after for android in future.
Note that the Android GUI is a rather different beast to either Swing or AWT. Most controls behave similarly, but things like the top level Activity class are very different (unless Swing has changed a lot in the last ten years).
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
3
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
5
Views
1K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K