Class ImageBackground
java.lang.Object
|
+----Background
|
+----ImageBackground
- public class ImageBackground
- extends Background
This class extends the "Background" class so that the game background
can be be an image and not just a single color background. This class
is taken directly from the book "Teach yourself Internet Game
Programming with Java in 21 days" by Michael Morrison. See chapter 6
for details.
-
image
-
-
ImageBackground(Component, Image)
- ImageBackground constructor method sets image for background
-
draw(Graphics)
- Draw background image.
-
getImage()
- Return the background "image" object
-
setImage(Image)
- Sets image for background
image
protected Image image
ImageBackground
public ImageBackground(Component comp,
Image img)
- ImageBackground constructor method sets image for background
getImage
public Image getImage()
- Return the background "image" object
setImage
public void setImage(Image img)
- Sets image for background
draw
public void draw(Graphics g)
- Draw background image.
- Overrides:
- draw in class Background