Wednesday, 27 February 2013

DIFFERENCE BETWEEN SWING AND AWT

java swing and awt class hierarchy
           Hello friends today I am going to post about java.First thing is We use awt and swing both for Graphical user interface.But what is the Difference between Java Swing and Awt?Here In this Article I will explain how Swing is totally Differed from Awt.
ABSTRACT WINDOW TOOLKIT(AWT)
          Awt is a abstract window toolkit.Which is heavy weight component for graphical user interface.Suppose you Are create a graphics using Abstract Window Toolkit(AWT) in windows and same project you are running on linux or mac os then output is differ in all operating System.It means that AWT(abstract window toolkit) is platform dependent.Also Awt is not provide Pluggable look and feel.Now I know that you Have a Question in your mind that what is pluggable look and feel?This thing i will discuss in details in Swing part.Awt is not provide the Attractive look As Swing.
SWING
        Swing is fully featured graphical user interface(GUI) development kit for java application.It provides More Gui component then Awt.for use Swing in application we must have to import javax.swing.* Here * is for all packages included in javax.swing.We have discussed that Awt is heavy weight component of java but Swing is a better option for Awt because Swing is light weight component of java.And the most advantage of using swing is it is platform independent.It means it provide the same graphical user interface in all operating System.Swing also Supports the pluggable look and feel.Now, Pluggable look and feel means we can integrate and easily modify the view and controller part of java Swing.Look means a view part and feel means a controller part.In model view controller we keep seprate model part from view and controller So we can easily modify it.
      So friends these are the basic difference between Java Swing and Awt.Here is the Overview of this Article.

DIFFERENCE BETWEEN SWING AND AWT
Swing is platform independentAwt is platform Dependent
Swing is light Weight component of javaAwt is heavy weight component of java
Swing provides Rich set of Gui componentsAwt not provides rich set of Gui components compare to Swing
Swing provides pluggable look and feelAwt not provides pluggable look and feels
With use of Swing we can make attractive guiWith use of Awt we can not make more attractive gui compare to awt
 
    So These are all differences between Swing and Awt.If you Have Any Question Related to this topic then feel free to ask in comments and we will Solve it.Have a nice day.
                                                                         
     

No comments:

Post a Comment