Posted by Robert Richardson
My problem isn't with the Combo Box. It appears to be related to the way the scanner class works.
Exactly. As I said before, when you use the Scanner, it misses out the delimiter. Go through the API about Scanner and that ought to explain your problem.
It isn't reading the line shorter than it should be. It has its own way of reading the line and that way happens to be shorter than the line you have in your text file.
Try something like this:
That should print out each token with --- before and after, so you can see the lengths of tokens the Scanner actually reads.
That ought to explain to you where your problem lies.