Forums Register Login

LayoutManager

+Pie Number of slices to send: Send
public LayoutApplet ( ) {
2. setLayout(new BorderLayout());
3. setFont(new Font("Serif", Font.PLAIN, 14));
4. add(BorderLayout.NORTH, new Button("North"));
5. add(BorderLayout.SOUTH, new Button("South"));
6. add("East", new Button("East"));
7. add("West", new Button("West"));
8. add(new Button("Center"));
9. }

Statement 2 is ignored and the default Layout Manager for an Applet is used. //f

b) There is a compile error on line 6: you cannot mix the use of Strings and Constants to specify the location of components. //f

c) There is a compile error on line 8: the location specification via a String or Constant is not provided. //f

d) Five push buttons are drawn, with the largest push button in the center. //t

e) The code compiles successfully //t

+Pie Number of slices to send: Send
Statement 2 is ignored and the default Layout Manager for an Applet is used. //f
b) There is a compile error on line 6: you cannot mix the use of Strings and Constants to specify the location of components. //f
c) There is a compile error on line 8: the location specification via a String or Constant is not provided. //f
d) Five push buttons are drawn, with the largest push button in the center. //f
e) The code compiles successfully //t
add(BorderLayout.NORTH, new Button("North"));
add(new Button("North"),BorderLayout.NORTH);
add("North", new Button("North"));
are same.......
No holds barred. And no bars holed. Except this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 723 times.
Similar Threads
BorderLayout
About GridLayout
question 39 if Abhilash mock test
IBM's exam questions
layout managers
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:42:21.