title: How do I add JButtons and JLabels without conflicts?
body: <p>When I try to add a JButton and a JLabel into a JFrame, they both conflict each other in which all the JButtons would disappear and only the JLabel would be visible. The JLabel for some reason would go to the left most side of the JFrame instead of the desired location I set it to go. I'm new to GUI related material and I'm willing to learn from these mistakes.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.awt.GridBagConstraints;
  import java.awt.GridBagLayout;
  import java.awt.Insets;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  import javax.swing.ImageIcon;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JOptionPane;
  import javax.swing.JPanel;
  public class Windowb extends JFrame{
      static String title = "This is a JFrame";
      static int width = 500;
      static int height = 400;
  
      private static final int BUTTON_LOCATION_X = 46;
      private static final int BUTTON_LOCATION_Y = 80;
  
      public static void main(String[]args){
          Windowb simple = new Windowb(title, width, height);
          JPanel p = new JPanel(); 
          p.setLayout(null);
          JLabel c1 = new JLabel("Name: ");
          JButton b1 = new JButton("Name:");
          JButton b2 = new JButton("Grade:");
          JButton b3 = new JButton("GPA");
          b1.setBounds(BUTTON_LOCATION_X, BUTTON_LOCATION_Y, 90, 20);
          b2.setBounds(50, 170, 90, 20);
          b3.setBounds(50, 240, 90, 20);
          c1.setLocation(100, 250);
  
          b1.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                  JOptionPane.showMessageDialog(null, "ActionListener is working!");
              }
  
          });
  
  
          b2.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
              JOptionPane.showMessageDialog(null, "The second one works too!");
              }
          });
  
          b3.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                  JOptionPane.showMessageDialog(null, "Surprise!");
              }
          });
          p.add(b1); 
          p.add(b2); 
          p.add(b3);
          simple.add(p);
          simple.add(c1);
      }
  
      public Windowb(String t, int w, int h){
          setVisible(true);
          setResizable(true);
          setSize(w, h);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setLocation(500, 100);
          setTitle(t);
      }
  }
  </code></pre>