Does any one know of a class that creates unlimited JTextFields that can collect data?
Thanks.
ceyesuma -4
Posting Pro
Recommended Answers
Jump to Postis txt actually a new JTextField() if the name is changed
No. The name belongs to the Component class a parent of the textfield class. The textfield object is the same object created with the new statement.
Is it possible to get unique txt.getText(); from txt fields if the txt.setName() …
Jump to Posthow is one different from the other so I can always get the txt for each.
You can get to each textfield/object by saving a reference to it. Usually there is a variable name associated with each object. But in some cases you store the references to an object in …
Jump to PostWhat do you need access to in the actionPerformed() method?
If references to all your text fields are in an array, then you can get the text from them by: String text = anArrayOfTF[ix].getText();
All 9 Replies
ceyesuma -4
Posting Pro
NormR1 563
Posting Sage Team Colleague
ceyesuma -4
Posting Pro
ceyesuma -4
Posting Pro
NormR1 563
Posting Sage Team Colleague
ceyesuma -4
Posting Pro
NormR1 563
Posting Sage Team Colleague
ceyesuma -4
Posting Pro
ceyesuma -4
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.