title: Java Text Field of form to new form
body: <p>I'm new in Java, just want to ask a simple question
  I have my first form and a text field, I input a text there the once I click the button
  a new form will come out and the Text in the text Field will be come a Label the the new form</p>
  
  <p>I try this code but it doesn't work</p>
  
  <pre><code>public class Data extends javax.swing.JFrame {
  
    public Data() {
      initComponents();
  
      FrmLogIn f = new FrmLogIn();
      User.setText(f.UName.getText());
      User.setVisible(true);
  }
  </code></pre>