Java Practical 2
Rohit143
java
4 years ago
842 B
24
Indexable
import java.awt.*;
class Myframe extends Frame{
Choice choice;
List list;
Myframe(){
setLayout(null);
setVisible(true);
setSize(500, 500);
Label label =new Label("By Rohit Nandagawali");
label.setBounds(20, 40, 150, 20);
add(label);
choice = new Choice();
choice.add("first Item");
choice.add("second Item");
choice.add("Third Item");
choice.setBounds(20, 100, 100, 100);
add(choice);
list = new List(3);
list.add("first item");
list.add("second item");
list.add("Third item");
list.setBounds(20, 150, 100, 100);
add(list);
}
}
public class practical2 {
public static void main(String[] args) {
new Myframe();
}
}
Editor is loading...