• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

vectors

 
Anish Patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i have created a vector with three elements salaried employee, nonsalaried employee and directors
i have also created text field using swing also lable which there details i.e. there name, payroll number,etc and i want to know i can insert the data from the vector in to the text fields
any help would be greatfull
 
ping203
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the setText(String) method of JTextField and the element in the vector needs to override the toString() to return a String (maybe their name or their title)

if your textfield is also an array, then
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic