why swings when awt exists

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satyabhaskar
    New Member
    • Dec 2008
    • 32

    #1

    why swings when awt exists

    hi all,
    i want to know the perfect example where we can use only awt or we can use only swings in the GUI programming...
    can any plz clear my doubt
    thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by satyabhaskar
    hi all,
    i want to know the perfect example where we can use only awt or we can use only swings in the GUI programming...
    can any plz clear my doubt
    thanks
    Swing has many more components (widgets) than AWT has; Swing can be adjusted to your changing needs (look and feel wise speaking) and it is so soft for your hands. The AWT library was written by Sun in great haste because before AWT there was nothing for the Java platform. Swing made the right choice and reused what was reusable from AWT and created its own components and stuff where needed. Better use Swing only; btw, the name is 'Swing', not 'swings'.

    kind regards,

    Jos

    Comment

    • preetam3
      New Member
      • Jan 2009
      • 2

      #3
      AWT componets are more heavyweight as compared to swing components. AWT is more limited in supplying the same functionality on all platforms because not all platforms implement the same-looking controls in the same ways. Swing components are called "lightweigh t" because they do not require a native OS object to implement their functionality.

      As far the above question that areas where only swing or only awt are used, well I can say that Swing has many advanced features like JTabel,Jtabbed pane which is not available in awt. so projects depending on these components can be made using swing but not awt.

      Comment

      Working...