actually I have a code which I think it's complete , but i don't know how to run it on Eclipse...
that's a pinball game on java and i want to practice from this code :
in all classes it shows this error :
**Selection Doesn't contain an applet...**
what should I do to run it ?!
<APPLET CODE="PinBallGame.class" WIDTH=556 HEIGHT=530>
<PARA NAME="HIT_SOUND" VALUE="sounds/floor.au">
</APPLET>
That applet element combined with the japplet tag makes me think the class declaration of that class must be:
public class PinBallGame extends JApplet //..
However a search on 'PinBallGame.java' in the list of classes shows no hits. I.E. whatever that code represents, it is not a complete example of the applet.
..want to practice from this code:
That code is a poor example to base learning on, given the lack of a complete, workable example.
More importantly, it is much easier to develop and deploy a free floating desktop application in a frame (JFrame
).