You need to create a jframe and add the jpanel component to it. jpanel cannot be displayed on its own.
so you can modify the code as
JFrame jframe1 = new JFrame("NewFrame");
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLO SE);
JPanel jPanel1 = new javax.swing.JPanel();
JLabel jLabel1 = new javax.swing.JLabel("how r u");
JButton jButton1 = new javax.swing.JButton("yes");
JTextField jTextField1 = new javax.swing.JTextField();
JPanel1.setLayout(new FlowLayout());
jPanel1.add(jLabel1);
jPanel1.add(jButton1);
jPanel1.add(jTextField1);
jPanel1.setVisible(true);
jframe1.add(jPanel1);
jframe1.setSize(400,400);
jframe1.setVisible(true);
Hope this solves your problem