The program works just like the picture, but I can't figure out why the Coordinates are displayed in the top corner too. I see where the coordinated are added to the panel and put in BorderLayout.SOUTH, but I don't see where they are added to the top of the drawing canvas.
It's not; it's just an artifact due to broken code. You're not supposed to override the paint() method of a Swing component, but rather the paintComponent() method. Overriding paint() is leading to some painting errors where that label appears to be rendered in more than one place.
If you change the "public void paint(Graphics..." to "public void paintComponent(Graphics..." this problem should disappear. And then please be careful where you get your sample code from in the future!