AWT Class44
AWT Class44
ANNWESHA BANERJEE
Introduction
Method Description
public void setSize(int width,int sets the size (width and height) of
height) the component.
Method Description
Creating AWT Application
import java.awt.*;
class Test_AWT extends Frame{
Test_AWT(){
Label l=new Label("Test AWT");
l.setBounds(20,100,200,200);
Button b1=new Button("CLICK");
b1.setBounds(30,100,80,30);
add(l);
add(b1);
setSize(300,300);
setLayout(null);
setVisible(true);
}
public static void main(String[] aa){
Test_AWT t=new Test_AWT();
}
}
Event Handling
Component Method