title: How can I select text over two different JTextField's?
body: <p>Lets say I have this code:</p>
  
  <pre><code>  public static void main(final String [] args)
    {
      final JFrame frame = new JFrame("Display Keyword Panel");
      final JPanel panel = new JPanel(new BorderLayout());
  
  
      JTextField text1 = new JTextField("This is the first text field");
      text1.setBorder(null);
      text1.setOpaque(false);
      text1.setEditable(false);
  
      JTextField text2 = new JTextField("This is the second text field");
      text2.setBorder(null);
      text2.setOpaque(false);
      text2.setEditable(false);
  
      panel.add(text1, BorderLayout.NORTH);
      panel.add(text2, BorderLayout.SOUTH);
  
      frame.setLayout(new BorderLayout());
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.getContentPane().add(panel, BorderLayout.CENTER);
      frame.setLocation(450, 400);
      frame.pack();
      frame.setVisible(true);
    }
  </code></pre>
  
  <p>I would like to select text over both text1 and text2 fields so that I can copy them both at the same time.  But when I run the application I can only select the text from 1 text field at a time.  How can I make it so that I can select text over all of the text fields that I might have in my program?</p>