An applet has to be declared public
. So:
class app extends JApplet {
Should be:
public class app extends JApplet {
Tips
1) Please learn common Java naming conventions (specifically the case used for the names) for class, method & attribute names & use them consistently.
2) Ensure the Java Console is configured to show for applets & JWS apps. If there is no output at the default level, raise it and try again.
3) The code
attribute should be the FQN, not the file name, so:
<applet code="app.class" width="400" height="400"></applet>
Should be:
<applet code="app" width="400" height="400"></applet>