Add JPanel to on button click
<p>kind of a newb so I couldn't quite get the other answers.</p>

<p>So I'm making a program where you keep track of exercise feedback. Every set of exercises has a different amount of exercises, so I can't put 10 fields and hope they're enough.</p>

<p>So I have a frame which contains scrollpane and a panel and in there are some general textfields concerning the coursework. Underneath I need to dynamically add panels according to the users whish. Any idea how to do this?</p>

<p>The general panel
<a href="https://i.stack.imgur.com/8jR2o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8jR2o.png" alt="My window"></a></p>

<p>The panel I need to add dynamically to the empty space of the previous panel.
<a href="https://i.stack.imgur.com/MyHkc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MyHkc.png" alt="enter image description here"></a></p>