Professional Documents
Culture Documents
Or Window-Based Applications in Java
Or Window-Based Applications in Java
Or Window-Based Applications in Java
Panel The Panel is the container that doesn't contain title bar
and menu bars. It can have other components like button,
textfield etc.Panel provides spaces in which an application can
attach any other components.
Method Description
public void add(Component c) Inserts a component on a
frame
public void setSize(int Sets the size of the frame in
width,int height) terms of width and height.
public void Defines the layout manager of
setLayout(LayoutManager m) the frame.
public void setVisible(boolean Changes the visibility of the
status) frame by default it is false.
Example
f.add(b1);
f.setSize(600, 600);
f.setVisible(true);
}
Handling Events in AWT.
p……………………………………………………………..`
Steps in event handling.
1. Border Layout
2. Grid Layout
3. GridBag Layout
4. Card Layout
5. Flow Layout