import javax.swing.*; 
 class Win extends JFrame {
    JPanel jPanel1;
    JPanel jPanel2;
    JButton jButton1;
    JButton jButton2;
    public Win(){
        getContentPane().setLayout(null);
        setTitle("面板应用");
            jPanel1= new JPanel();
            jPanel2= new JPanel();
            jButton1= new JButton("我在面板一中");
            jButton2= new JButton("我在面板二中");
            jPanel1.setLayout(null);
            jPanel2.setLayout(null);
            jButton1.setBounds(3, 0, 153, 75);
            jButton2.setBounds(13, 7, 151, 73);
            jPanel1.add(jButton1);
            jPanel2.add(jButton2);
            jPanel1.setBounds(21, 23, 167, 80);
            jPanel2.setBounds(11, 102, 177, 105);
            getContentPane().add(jPanel1);
            getContentPane().add(jPanel2);
            setBounds(200, 200, 200, 230);
            validate();
            setVisible(true);
    }
}
public class JPanel_test{
    public static void main(String args[]){
        Win ta = new Win();
    }
  }
