Solved

What Is Wrong with the Following Message to Create a BoxLayout

Question 25

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents