title: JTextField Won't accept Input
body: <p>So I made a test window with a JTextField in it. And I cannot tell whats going wrong. The main code is down below. The problem is that no matter what I do, I cannot edit the text field nor the second one I made. I have a sample program with a text field that works as well, yet it doesn't work at all. </p>
  
  <p>I'm not sure if I need to post it, but I can get a sample jar of the complete program up here. I only posted the area that handles the text Fields</p>
  
  <p>EDIT: The full source is available here: <a href="https://github.com/Coolway99/ToS_Forum_Mafia_Note_Taker" rel="nofollow">GITHUB</a> </p>
  
  <p>I removed something and it worked, I give up...\</p>
  
  <p>EDIT2: It turns out it was the fact I was calling a class that extended JPanel, simply calling a new JPanel instead of extending it worked</p>
  
  <p>EDIT3: Ok, the problem was the key event dispatcher, the post I marked as the answer explains it in-depth</p>
  
  <pre><code> public class Main {
      private static JPanel mainPanel = new JPanel();
      private static JFrame frame;
      public static JTextField textField1 = new JTextField();
      public static JTextField textField2 = new JTextField();
      private static GroupLayout layout = new GroupLayout(mainPanel);
  
      public static void main(String[] Args) throws InterruptedException{
          frame = new JFrame("Test Window");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          mainPanel.setLayout(layout);
          layout.setAutoCreateContainerGaps(false);
          layout.setAutoCreateGaps(false);
          GroupLayout.SequentialGroup hGroup = layout.createSequentialGroup();
          GroupLayout.SequentialGroup vGroup = layout.createSequentialGroup();
          vGroup.addGap(200).addGroup(layout.createParallelGroup().addComponent(textField1, 25, 25, 25).addComponent(textField2, 25, 25, 25).addGap(350));
          hGroup.addGap(300)
          .addGroup(layout.createParallelGroup().addComponent(textField1, 200, 200, 200).
                  addComponent(textField2, 200, 200, 200)).addGap(300);
          layout.setVerticalGroup(vGroup);
          layout.setHorizontalGroup(hGroup);
          frame.add(mainPanel);
          frame.pack();
          frame.setResizable(false);
          frame.setVisible(true);
          textField1.setText("I am a simple uneditable testbox");
      }
  }
  </code></pre>