Java AWT Layout Managers

Questions about Java AWT and Swing layout managers, container classes, Font class, and helper classes used in GUI programming

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How many container classes are there in java AWT?

  1. 6
  2. 5
  3. 4
  4. 3
  5. 2
Question 2 Multiple Choice (Single Answer)

How many maximum arguments can be passed to the FlowLayout Constructor?

  1. 5
  2. 4
  3. 3
  4. 2
  5. 1
Question 3 Multiple Choice (Single Answer)

How many maximum arguments can we pass to the GridLayout constructor?

  1. 6
  2. 5
  3. 4
  4. 3
  5. 2
Question 4 Multiple Choice (Single Answer)

How many layout managers are present in java?

  1. 10
  2. 9
  3. 8
  4. 7
  5. 6
Question 5 Multiple Choice (Single Answer)

What is the third argument passed to constructor of Font class?

  1. Int size
  2. String name
  3. Int style
  4. Int alignment
  5. Int Color
Question 6 Multiple Choice (Single Answer)

How many maximum arguments can be passed to the BorderLayout Constructor?

  1. 5
  2. 4
  3. 3
  4. 2
  5. 1
Question 7 Multiple Choice (Single Answer)

What is the third argument passed to the Constructor of GridLayout?

  1. Int rows
  2. Int columns
  3. Int HorizontalGap
  4. Int VerticalGap
  5. Int Alignmnent
Question 8 Multiple Choice (Single Answer)

Which of the following is/are not known as the helper class in java AWT?

  1. LayoutManager
  2. Colour
  3. Font
  4. Dimensions
  5. Graphics
Question 9 Multiple Choice (Single Answer)

What is the Default Layout Manager of the Panel p1 that we have created?

JPanel p1 = new JPanel()

  1. BorderLayout
  2. CardLayout
  3. FlowLayout
  4. GridLayout
  5. BoxLayout
Question 10 Multiple Choice (Single Answer)

How many arguments are passed to the constructor of Font Class?

  1. 5
  2. 4
  3. 3
  4. 2
Question 11 Multiple Choice (Single Answer)

Which of the following argument is the third argument passed to the constructor of the FlowLayout?

  1. Int horizontalGap
  2. Int VerticalGap
  3. Int Alignment
  4. Int Rows
  5. Int Columns
Question 12 Multiple Choice (Single Answer)

Which of the following is/are the helper class in java AWT?

  1. Window
  2. Applet
  3. Panel
  4. Dimension
  5. Dialog
Question 13 Multiple Choice (Single Answer)

What is the Second Argument passed to the Constructor of GridLayout?

  1. Int rows
  2. Int columns
  3. Int horizontalGap
  4. Int VerticalGap
  5. Int Alignment
Question 14 Multiple Choice (Single Answer)

What is the third argument passed to the Constructor of BorderLayout?

  1. Int alignment
  2. Int horizontalGap
  3. Int VerticalGap
  4. Int Rows
  5. None of these
Question 15 Multiple Choice (Single Answer)

How many constructors are there of CardLayout?

  1. 5
  2. 4
  3. 3
  4. 2
  5. 1