setLayout

override fun setLayout(mgr: LayoutManager?)

Accepts only the layout manager the panel builds from its MeasurePolicy.

Throws

for any other value, including null.