0% found this document useful (0 votes)
2 views2 pages

Program 8

The document discusses Java applets, which were small applications designed for web browsers to add interactivity and multimedia content to websites. It explains their purpose, how they worked, and notes their decline due to security issues and lack of browser support, leading to their deprecation by Oracle in 2015. A sample code for a simple Java application using JFrame and JLabel is also provided.

Uploaded by

trishti19061906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Program 8

The document discusses Java applets, which were small applications designed for web browsers to add interactivity and multimedia content to websites. It explains their purpose, how they worked, and notes their decline due to security issues and lack of browser support, leading to their deprecation by Oracle in 2015. A sample code for a simple Java application using JFrame and JLabel is also provided.

Uploaded by

trishti19061906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PROGRAM-8

AIM:- Write a program to demonstrate the concept of applet.

Overview;
Java applets were small applications written in the Java programming language
that could be embedded in web pages and run within a web browser. They were
originally used to add interactivity, multimedia, and dynamic content to websites.
Java applets were popular in the late 1990s and early 2000s but have largely been
replaced by newer web technologies due to security concerns and changes in
browser support.

Purpose:
• Java applets were designed to be platform-independent, meaning they
could run on any operating system that had a Java Virtual Machine (JVM)
installed.
• They were often used for interactive web applications, games, charts,
scientific simulations, and multimedia presentations on websites.

How They Worked:


• Applets were embedded in HTML pages using the <applet> tag (in older
browsers) or <object> tag.
• The browser would download the applet and run it inside a special "applet
viewer" or applet container provided by the JVM.
• Applets had restricted access to system resources for security reasons,
operating in a "sandbox" environment.

End of Java Applets:


• As of 2015, Oracle officially deprecated Java applets and the NPAPI
plugin, and by 2017, most browsers stopped supporting them entirely.
• Applets are now considered obsolete in favor of modern web development
standards.

Code:
import javax.swing.JFrame; import

javax.swing.JLabel; import

javax.swing.SwingConstants;

public class program_8 { public static

void main(String[] args) {

JFrame frame = new JFrame("Dev ‘s Apple Application");

JLabel label = new JLabel("Hello, World!", SwingConstants.CENTER);

frame.add(label);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.setSize(300, 200);

frame.setVisible(true);

OUTPUT

You might also like