public class CarIcon extends java.lang.Object implements javax.swing.Icon
| Modifier and Type | Field and Description |
|---|---|
private int |
width |
| Constructor and Description |
|---|
CarIcon(int aWidth)
Constructs a car of a given width.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
private int width
public CarIcon(int aWidth)
aWidth - the width of the carpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon in interface javax.swing.Icon