Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
12 views4 pages

Practical2 New

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)
12 views4 pages

Practical2 New

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/ 4

>Program Code:

Write Java Program to show following output.

import java.awt.*;
public class question6 {
public static void main(String args[])
{
Frame f=new Frame();
f.setSize(500,500);
f.setLayout(new FlowLayout());
f.setVisible(true);
List l=new List(4);
f.add(l);
l.add("Summer");
l.add("Winter");
l.add("Rainy");
}
}

>Exercise:
1.Develop an applet/application using List components to add names of 10
different cities.
import java.awt.*;
public class question7 {
public static void main(String args[])
{
Frame f=new Frame();
f.setSize(500,500);
f.setLayout(new FlowLayout());
f.setVisible(true);
List l=new List(7,true);
f.add(l);
l.add("Karad");
l.add("Kolhapur");
l.add("Pune");
l.add("Mumbai");
l.add("Kolkata");

MADHURA MAHESH INGAWALE 2251


l.add("Nagpur");
l.add("Latur");
l.add("Nashik");
l.add("Belgaon");
l.add("Beed");
}
}

Output:

2.Develop applet/application to select multiple names of news papers.

import java.awt.*;
public class question8 {
public static void main(String args[])
{
Frame f=new Frame();
f.setSize(500,500);
f.setLayout(new FlowLayout());
f.setVisible(true);
List l=new List(4,true);
f.add(l);
l.add("Pudhari");
l.add("Lokmat");
l.add("Sakal");
l.add("Loksatta");
l.add("Agrowan");
l.add("Punyanagari");
}

MADHURA MAHESH INGAWALE 2251


Output:

MADHURA MAHESH INGAWALE 2251


MADHURA MAHESH INGAWALE 2251

You might also like