Professional Documents
Culture Documents
Ans. FlowLayout
Ans. 1) North
2) South
3)East
4)West
5)Center
Ans.A frame's insets include a top inset that compensates for the frame's titlebar,
and insets all around that compensate for the border (which we can use to resize
the frame). A panel contained within a frame has its own insets. Indeed, any
component has its own insets.
import java.awt.*;
import java.applet.*;
setFont(new Font("Monospaced",Font.BOLD,25));
setLayout(g);
for(int i=1;i<=9;i++)
add(new Button(""+i));
add(b1);
add(b2);
add(b3);
add(b4);
add(b5);
add(b6);
add(b7);
add(t);
/*<applet code="calculator"width="600"height="600">
</applet>*/
Output: