is wrong because, you're suppose to do 300 - an element of y array ( y) not y array i think. it should be g.drawLine(i, 300-x.y, i, 300-x.y[i+1]); or whatever coordinate you like.
next you seems want to open a file called Record.log, you should have that file in the same folder then i should works
I've this code for a htm page, it works fine. So what happen when you embeded the code in your page, blank or a applet started or what? - Make sure you've the Record.log file with some figures inside - Check your web browser, what are you using ? (IE or netscape ?) If IE then go to the internet option: go to advanced tab and look in the tick box inside, and check evry box that's related to Java ( Microsoft VM, JIT,...)