What are the differences between both and which one should i consider for the different kinds of java-based apps?

Recommended Answers

All 4 Replies

awt is the oldest, which means swing is the ... ta-daa :) youngest, most up to date and in certain parts improved compared to awt.

off course, you'll still use a number of awt functionalities, but if you intend to make GUI's in Java, I'd suggest picking up on Swing.

Well some of the conditions which could influence you use whether AWT or Swing are:-

  1. Eye Candy, Swing really gives you a lot more features when it comes to Eye candy, you can change the look and feel, add icons to buttons etc, which AWT would never allow
  2. Second point is where do you expect your application to run ?, If you want it to run on just about any machine with any version of JRE (even 1.0 or 1.1) then you do not have a choice but need to go with AWT. (Since swing was added only in version 1.2)
  3. AWT would also be an option in situations where limited CPU power or memory is an important factor.
  4. But for day to day desktop applications I would any time prefer Swing over AWT

can Swing run on web applets though?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.