when you add any element in Jframe using netbeans, netbeans add this component using its complex layout(see the auto generated code). So when you simply add any element using
this.add(jPanel2);
,its not appear in the frame.because it is not added to the frame what netbeans use to layout any component. So the best way is that do not add the panel directly in jframe instead first add a jscrollpane in jrame. And then add the required component(jpanel) in scrollpane.
jscrollpane.setViewportView(jPanel))