title: Java Swing GUI Invisible
body: <p>basically I have a very simple GUI, but for some reason when I run the code the JButtons only appear when I mouse over them, and the JTextField only appear if I click on them. How do I fix this so that they are visible when the program runs? Thanks.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    //JFrame + settings
      JFrame frmFormSubmission = new JFrame();
  
      frmFormSubmission.setSize(new Dimension(350, 165));
      frmFormSubmission.setTitle("Form Submission - Client");
      frmFormSubmission.setLocationRelativeTo(null);
      frmFormSubmission.setVisible(true);
      frmFormSubmission.setResizable(false);
      frmFormSubmission.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      //JPanel
      JPanel panel = new JPanel();
      frmFormSubmission.getContentPane().add(panel, BorderLayout.CENTER);
      panel.setLayout(null);
  
      //JLabels
      //Name
      JLabel lblName = new JLabel("Name:");
      lblName.setFont(new Font("Tahoma", Font.PLAIN, 14));
      lblName.setBounds(46, 12, 40, 14);
      panel.add(lblName);
  
      //Address
      JLabel lblAddress = new JLabel("Address:");
      lblAddress.setFont(new Font("Tahoma", Font.PLAIN, 14));
      lblAddress.setBounds(33, 37, 53, 14);
      panel.add(lblAddress);
  
      //Phone
      JLabel lblPhone = new JLabel("Phone #:");
      lblPhone.setFont(new Font("Tahoma", Font.PLAIN, 14));
      lblPhone.setBounds(28, 62, 58, 14);
      panel.add(lblPhone);
  
      //Email
      JLabel lblEmail = new JLabel("Email:");
      lblEmail.setFont(new Font("Tahoma", Font.PLAIN, 14));
      lblEmail.setBounds(46, 87, 36, 14);
      panel.add(lblEmail);
  
      //JTextFields
      //Name
      nameField = new JTextField();
      nameField.setBounds(93, 11, 137, 20);
      panel.add(nameField);
      nameField.setColumns(10);
  
      //Address
      addressField = new JTextField();
      addressField.setColumns(10);
      addressField.setBounds(93, 36, 137, 20);
      panel.add(addressField);
  
      //Phone
      phoneField = new JTextField();
      phoneField.setColumns(10);
      phoneField.setBounds(93, 61, 137, 20);
      panel.add(phoneField);
  
      //Email
      emailField = new JTextField();
      emailField.setColumns(10);
      emailField.setBounds(93, 86, 137, 20);
      panel.add(emailField);
  
      //JButtons
      //Submit
      JButton btnSubmit = new JButton("Submit");
      btnSubmit.setBounds(240, 10, 89, 23);
      panel.add(btnSubmit);
  
      //Cancel
      JButton btnCancel = new JButton("Cancel");
      btnCancel.setBounds(240, 44, 89, 23);
      panel.add(btnCancel);
  
      //Flush
      JButton btnFlush = new JButton("Flush");
      btnFlush.setBounds(240, 76, 89, 23);
      panel.add(btnFlush);
  
      //Checkbox
      JCheckBox chckbxPromotions = new JCheckBox("Email me with new and promotions!");
      chckbxPromotions.setBounds(25, 108, 205, 23);
      panel.add(chckbxPromotions);
  </code></pre>
  
  <p>Any help is very much appreciated!</p>