0% found this document useful (0 votes)
67 views3 pages

pr2 1-1

Uploaded by

seemakasture75
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)
67 views3 pages

pr2 1-1

Uploaded by

seemakasture75
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/ 3

Practical 2.

import java.awt.*;

public class pra2 extends Frame {

Choice ch1;

List ls1;

Button b1;

Label l1,l2;

pra2()

setLayout(new FlowLayout());

l1 = new Label("select your favaurite subject");

ls1 = new List();

ls1.add("Java");

ls1.add("Python");

ls1.add("C++");

ls1.add("C");

l2 = new Label("select your expertise level");

ch1 = new Choice();

ch1.add("biginner");
ch1.add("Intermediate");

ch1.add("Expert");

b1 = new Button("Submit");

add(l1);

add(ls1);

add(l2);

add(ch1);

add(b1);

setTitle("Simple AWT Form");

setSize(400, 400);

setVisible(true);

public static void main(String args[])

new pra2();

}
Output:

You might also like