DigitalClock2.java extends DigitalClock.java
[8/18]AnimationApplet.java
[14/18]BouncingBall.java
[16/18].class
files downloaded from the Web
java.applet.Applet
java.applet.Applet
by overriding some methodspublic void init(){...}
public void start(){...}
public void stop(){...}
public void destory(){...}
paint
method:
Theclass OurApplet extends Applet { . . . public void paint(Graphics g) { . . . } . . . }
paint
method is one of two display methods an applet can override:
paint
paint
method
to draw the applet's representation within a browser page.
update
paint
to improve drawing performance.
Applets inherit their paint
and update
methods
from the Applet
class,
which inherits them from the Abstract Window Toolkit (AWT) Component
class.
DigitalClock2.java extends DigitalClock.java
[8/18]AnimationApplet.java
[14/18]BouncingBall.java
[16/18].class
files, images, audio files, etc.
Operation | Command |
---|---|
To create a JAR file | jar cf jar-file input-file(s) |
To view the contents of a JAR file | jar tf jar-file |
To extract the contents of a JAR file | jar xf jar-file |
To extract specific files from a JAR file | jar xf jar-file archived-file(s) |
To run an application packaged as a JAR file
(version 1.1) |
jre -cp app.jar MainClass |
To run an application packaged as a JAR file
(version 1.2 -- requires Main-Class manifest header) |
java -jar app.jar |
To invoke an applet packaged as a JAR file | <applet code=AppletClassName.class archive="JarFileName.jar" width=width height=height> </applet> |