title: Scaling a subpanel while resizing
body: <p>I am working on a project with using Swing. Recently, I ve encountered a weird problem that I can't figure out how to solve. Had a look at similar questions and tried to use layouts for frame but it didnt solve the problem. All design is done with using free design. I am using Netbeans.</p>
  
  <p>My question is, I want every panel to be resized properly. Without losing half of the panel and buttons on the screen.</p>
  
  <p>Also tried to call pack() method in the componentListener(another solution that i saw here) but it didnt work neither. Here are some pictures of my project. </p>
  
  <p>Regards.</p>
  
  <p><img src="https://i.stack.imgur.com/ITQ1j.png" alt="enter image description here"> </p>
  
  <p>After resizing:</p>
  
  <p><img src="https://i.stack.imgur.com/Lszg3.png" alt="enter image description here"></p>