Solved

What Is Wrong with the Following Message to Create a BoxLayout

Question 14

Multiple Choice

What is wrong with the following message to create a BoxLayout for the JPanel jp?
Jp) setLayout(new BoxLayout(BoxLayout.X_AXIS) ) ;


A) X_AXIS is not a valid constant for BoxLayout, it should instead be HORIZONTAL
B) Aside from X_AXIS, the constructor also requires a Dimension to determine the size of the Box
C) Aside from X_AXIS, the constructor also needs a command regarding horizontal glue as in createHorizontalGlue( )
D) The BoxLayout constructor is lacking a reference to the container that the BoxLayout manager will govern
E) There is nothing wrong with it at all

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions