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

Practical 2.2 //develop Applet/application To Select Mutiple Names of Newspaper

This Java program develops an applet that allows multiple selections of newspaper names from a dropdown list. It imports the necessary AWT and Applet classes. It then creates a List object with a size of 10 and the ability to select multiple items. It adds four newspaper names to the list and adds the list to the applet. The applet code and dimensions are specified at the end to embed the applet in an HTML page.

Uploaded by

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

Practical 2.2 //develop Applet/application To Select Mutiple Names of Newspaper

This Java program develops an applet that allows multiple selections of newspaper names from a dropdown list. It imports the necessary AWT and Applet classes. It then creates a List object with a size of 10 and the ability to select multiple items. It adds four newspaper names to the list and adds the list to the applet. The applet code and dimensions are specified at the end to embed the applet in an HTML page.

Uploaded by

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

Practical 2.

2
//develop applet/application to select mutiple names of newspaper
import java.awt.*;
import
java.applet.*;
public class Newspaper extends Applet
{
public void init()
{
List l1=new List(10,true);
l1.add("The Indian
Express"); l1.add("The Times
of India"); l1.add("Lokmat");
l1.add("Hindhustan Times");
add(l1);
}
}
/*<applet code="Newspaper.java" width=300 height=300></applet>*/

You might also like