+
= Java-Dance
Welcome to Java-Dance!
Introduction:
Long time ago, you have had a dancing course, but because of no practice
you have forgotten most of the dancing steps?
No problem, if you have an Internet connection and a
Java capable browser like
HotJava or
Netscape 2.0.
Load the
Dance-Applet
and look at the animation of (currently) nine figures of four different ballroom
dances. With the single-step feature and the possibility to view the
figures synchron to nice dance music you should have no problems to refresh
your dancing skills.
Special Features:
Here a short list of the special features of the Dance-Applet:
- Two different languages built-in (german and english).
- Animation of different dance figures synchron to the music.
- Forward-backward stepping through the figures.
- Online help.
- Quick play-test of the different music titles.
- Additional information about every dance (only in german).
And some special Java-features which are used:
- Use of three concurrent threads to do the animation.
- No flickering through the use of Applet.update and Graphics.clipRect.
- Use of normal WWW-pages for online help.
- Use of derived classes and virtual functions for easy and clean programming.
The Source:
Java-Dance consists out of the eight source files with about
4600 lines of code:
-
- Dance.java
- This file implements the main applet class Dance.
- Figur.java
- In this file the class Figur and
the derived classes class SlowWaltz,
class Tango,
class SlowFox and
class Quickstep are defined.
These classes define how to dance, and what figures exist to dance.
- Floor.java
- Here the class Floor
is defined, which draws the dance floor.
- Foot.java
- The class Foot implements
the loading and drawing of the feets.
- Step.java
- All information about one step is stored in
class Step.
- Sound.java
- The class Sound is responsible
for playing the sound and displaying the time information.
- Button.java
- This file defines the classes
class Button,
class ToggleButton and
class MEXButton.
- MEXButtonList.java
- The class MEXButtonList defined in
this file implements a list head for the mutual exclusive button groups.
You can also get the complete JDance distribution:
jdance.tar.gz
(3.8 MB)
Thanks to ...
- Norman Hendrich for introducing HotJava at our department.
- Wolfgang Bartsch for beta-testing and reading.