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

Exp 2

Uploaded by

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

Exp 2

Uploaded by

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

EXPERIMENT NO 2

Q1)Develop an applet/application using List components to add names of 10 different


cities.

import java.applet.*;
import java.awt.*;
public class Exp2 extends Frame
{
Exp2()
{
setSize(200,300);
setVisible(true);
List l=new List(10,true);
l.add("Pune");l.add("Mumbai");l.add("Chennai");l.add("Delhi");l.add("Kolhapur");
l.add("Sangli");l.add("Satara");l.add("Bangolre");l.add("Nashik");l.add("Lonavala");
add(l);
}
public static void main(String[] args)
{
Exp2 r=new Exp2();
}
}
Q2) Develop an applet/application to select multiple names of news Papers.

import java.applet.*;
import java.awt.*;
public class RK12 extends Frame
{
RK12()
{
setSize(200,300);
setVisible(true);
List l=new List(10,true);
l.add("Sakal");
l.add("Times of India");
l.add("Lokmat");
l.add("Pune Times");
l.add("Maharashtra Times");
l.add("Kesari");
l.add("Prabhat");
l.add("Pune Mirror");
l.add("Indian Times");
l.add("Pudari");
add(l);
}
public static void main(String[] args)
{
RK12 r=new RK12();
}

You might also like