Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create textfields in a loop 1

Status
Not open for further replies.

dhaywood

IS-IT--Management
Jun 25, 2002
51
GB
Is there any way of creating JTextFields in a loop ie.

Int i = 1
String code = "Code" + i
JTextField code = new JTextField();

So if this was in a loop and i was incremented each time I would end up with Text Fields called code1..code2..code3 ect, but suprise suprise it does not work, does anyone have any ideas.

Thanks
 
please don't crosspost [Java(Sun) forum], its considered bad form !
 
Sorry thought I had posted it in the wrong place, I wont do it again. Thanks Again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top