• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with reading data  RSS feed

 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a program that reads from a file, stores the data in a vector, then displays it on a screen. The problem is that when the screen is first brought up it contains no data but I would like for it to have the first data from the vector. Another problem is that the first time I press the next button I get the second elements in the vector, after that I don't ever get the data to change, it just stays on the second element although it looks to me like it is cycling through the vector.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you thought about trying to debug by writing some System.out.println statements to see which Vector element you're on when you press the Next button?
 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I go directly to the last element and I can't seem to cycle through at all.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!