what is the diff's between swing and applet?

Answer Posted / naresh

swing
The Swing toolkit includes a rich set of components for
building GUIs and adding interactivity to Java applications.
Swing includes all the components table controls, list
controls, tree controls, buttons, and labels. It includes
rich undo support, a highly customizable text package,
integrated internationalization and accessibility
support..Swing supports numerous look and feels, including
the ability to create your own look and feel The ability to
create a custom look and feel is made easier with Syntha
component toolkit without the basic user interface
primitives such as drag and drop, event handling,
customizable painting, and window management.
Swing is part of the Java Foundation Classes (JFC)The JFC
also include other features important to a GUI program, such
asto add rich graphics functionality and the ability to
create a program that can work in different languages and by
users with different input devices.
the features that Swing and the Java Foundation
Classes provide.:
1. Swing GUI Components:
The Swing toolkit includes a rich array of components: from
basic components ,such as buttons and check boxes complex
components, such as tables and text. simple components, such
as text fields, offer sophisticated functionality, such as
formatted text input or password field behavior.

2. Java 2D API: Java 2DTM API. Because Swing is built on the
2D package, it's trivial to make use of 2D within Swing
components. Adding images, drop shadows, animations,
compositing — it's easy with Java 2D.
Pluggable Look-and-Feel Support’:
Swing components has a choice of look and feel .The JFC
classes shipped by Sun and Apple provide a look feel that
matches that of the platform. The Synth package allows you
to create your own look and feel. The GTK+ look and feel
makes hundreds of existing look and feels available to Swing
programs.
Data Transfer:
Data transfer, via cut, copy, paste, and drag and drop, is
essential to almost any application. Support for data
transfer is built into Swing and works between Swing
components within an application, between Java applications,
and between Java and native applications.



Internationalization:
This feature allows developers to build applications that
can interact with users worldwide in their own languages and
cultural conventions. Applications can be created that
accept input in languages that use thousands of different
characters, such as Japanese, Chinese, or Korean.
Undo Framework API: Swing's undo framework allows developers
to provide support for undo and redo. Undo support is built
in to Swing's text component. Swing supports an unlimited
number of actions to undo and redo.
The main characteristics of the Swing toolkit:
 platform independent
 customizable
 extensible
 configurable
 lightweight



Applets:
An applet is a Java program that runs in a Web browser. An
applet can be a fully functional Java application because it
has the entire Java API at its disposal.

There are some important differences between an applet and a
standalone Java application, including the following:

*

An applet is a Java class that extends the
java.applet.Applet class.
*

A main() method is not invoked on an applet, and an
applet class will not define main().
*

Applets are designed to be embedded within an HTML page.
*

When a user views an HTML page that contains an
applet, the code for the applet is downloaded to the user's
machine.
*

A JVM is required to view an applet. The JVM can be
either a plug-in of the Web browser or a separate runtime
environment.
*

The JVM on the user's machine creates an instance of
the applet class and invokes various methods during the
applet's lifetime.
*

Applets have strict security rules that are enforced
by the Web browser. The security of an applet is often
referred to as sandbox security, comparing the applet to a
child playing in a sandbox with various rules that must be
followed.
*

Other classes that the applet needs can be downloaded
in a single Java Archive (JAR) file.

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which swing methods are thread-safe?

825


What is the use of java swing?

748


What is the mean of swing?

647


What is the difference between swing and awt?

700


What is swing container?

689






Is java swing deprecated?

787


What is the difference between invokeAndWait() and invokeLater()?

773


What is content pane in swing?

688


What is swing gui?

658


What are swing components in java?

638


What is swing and its features in java?

699


Explain the difference between awt and swt.

744


What are the advantages of java swing over angular?

655


am searching for the job based on java, swing, currently working small company. they are not giving any salary slip, offer letter. so if i try outside for MNC's they start with previous company details. what should i do..? please help me to get job and make my career.

2368


Which window contains the swing controls?

696