Search code examples
javaswingjtextfield

Name declaration for JTextField


JTextField tfA = new JTextField();
tfA.setName("tfB");

Now, What is my text field name? tfA or tfB ?


Solution

  • The simple answer to your question is that the field name is tfB. The variable will be tfA.