title: How to make scrollable to jPanel
body: <p>I am making swing application. And there is too much height of my jPanel. So I want to make this panel as scrollable.:
  Following is my description of my requirement.</p>
  
  <p>I have four jpanel in one jpanel I mean:</p>
  
  <pre><code>JPanel p1=new JPanel();
  JPanel p2=new JPanel();
  JPanel p3=new JPanel();
  JPanel p4=new JPanel();
  </code></pre>
  
  <p>I am adding <code>p2, p3, p4</code> inside <code>p1</code> like following output:</p>
  
  <p><img src="https://i.stack.imgur.com/tTCZo.png" alt="MyOutput"></p>
  
  <p>like above showing panel has more height than computer screen height. So I want to display all content of my panel on computer screen by scrolling.</p>
  
  <p>I searched here and found the following questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/7201990/how-to-make-a-jpanel-scrollable">How to make a JPanel scrollable?</a></li>
  <li><a href="https://stackoverflow.com/questions/2287761/how-do-i-get-vertical-scrolling-to-jpanel">How do i get vertical scrolling to JPanel?</a></li>
  </ul>
  
  <p>However, the answers did not solve myproblem.</p>