Program 8
Program 8
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.
Code:
import javax.swing.JFrame; import
javax.swing.JLabel; import
javax.swing.SwingConstants;
frame.add(label);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300, 200);
frame.setVisible(true);
OUTPUT