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

Practical No 6

Uploaded by

Payal Jadhav
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)
21 views2 pages

Practical No 6

Uploaded by

Payal Jadhav
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

Practical No.

import java.awt.*;
import javax.swing.*;
public class Practical6 extends JFrame
{
public Practical6()
{
Container ct = getContentPane();
ct.setLayout(null);
JLabel jl = new JLabel("Selected country");
JComboBox jc = new JComboBox();
jc.addItem("English");
jc.addItem("Hindi");
jc.addItem("Marathi");
jc.addItem("Sunskit");
ct.add(jl);
ct.add(jc);
jl.setBounds(30,50,100,30);
jc.setBounds(150,50,100,30);

}
public static void main(String arg[])
{
Practical6 p = new Practical6();
p.setTitle("Demostrating ComboBox");
p.setSize(300,400);
p.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
p.setVisible(true);
}
}

You might also like