Ajp Prac 1
Ajp Prac 1
Program code:
import java.awt.*;
class prac1_saee
{
public static void main(String args[])
{
Frame f=new Frame();
f.setLayout(new FlowLayout());
f.setVisible(true);
f.setSize(400,400);
f.add(c1);
f.add(c2);
f.add(c3);
f.add(c4);
f.add(cb1);
f.add(cb2);
}
}
Output:
import java.awt.*;
class exp1_saee1
{
public static void main(String args[])
{
Frame f=new Frame();
f.setLayout(new FlowLayout());
f.setVisible(true);
f.setSize(400,400);
f.setTitle("exp1_saee1");
Label l1=new Label("UserName");
Label l2=new Label("Password");
TextField t1=new TextField(20);
TextField t2=new TextField(20);
t2.setEchoChar('*');
TextArea ta=new TextArea(10,30);
Button b1=new Button ("Submit");
f.add(l1);
f.add(t1);
f.add(l2);
f.add(t2);
f.add(ta);
f.add(b1);
}
}
Output :
Exercise :
Output: