Differences between Swing and Applets are :
Applet VS Java(Source Image) |
Swing |
Applet |
Swing
is light weight Component.
|
Applet
is heavy weight Component.
|
Swing
have look and feel according to user view you can change look and feel using
UI Manager.
|
Applet
Does not provide this facility.
|
Swing
uses for stand lone Applications, Swing have main method to execute the
program.
|
Applet
need HTML code for Run the Applet.
|
Swing
uses MVC Model view Controller.
|
Applet do not uses MVC Model view Controller.
|
Swing
have its own Layout like most popular Box Layout.
|
Applet
uses AWT Layouts like flow-layout.
|
Swing
have some Thread rules.
|
Applet
doesn't have any rule.
|
To
execute Swing no need any browser By which we can create stand alone
application But Here we have to add container and maintain all action control
with in frame container.
|
To
execute Applet program we should need any one browser like Applet-viewer, web
browser. Because Applet using browser container to run and all action control
with in browser container.
|
What is Swing ?
Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes – an API for providing a graphical user interface for Java programs. Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit.
What is Applet ?
A Java applet was a small application that is written in the Java programming language, or another programming language that compiles to Java byte-code, and delivered to users in the form of Java byte-code.