Your test file should have all occurrences of digits. If I had six apples and gave away seven , I would then owe one apple. You can use StringTokenizer to scan a line, but you don't have to. Using a hash table really simplifies the logic. I've done something similar with Web pages in my JustLinks applet with the engine.
Spots really are objects.
It is the spot's, not the applet's, responsibility to know how to draw itself. You will create an applet that will draw more than one spot on the screen. A spot is drawn when the mouse button is pressed. The spots will have nice colors, nice shapes and nice sizes. This is a bigger project.