Two classes included in this code --------------------------------------------------------- package twotees.desktop.gui; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JPanel; import twotees.desktop.gui.widgets.StatusBar; public class TestCase { public TestCase() { JFrame frame = new JFrame("Test Case"); frame.setSize(new Dimension(500, 500)); JPanel pane = new JPanel(); pane.add(new StatusBar(5)); frame.add(pane); pane.setVisible(true); frame.setVisible(true); } public static void main(String[] args) { new TestCase(); } } ------------------------------------------------------------------------------ package twotees.desktop.gui.widgets; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.ImageObserver; import java.util.ArrayList; import javax.swing.ImageIcon; import javax.swing.JLabel; /** * Represents a status bar that has a certain number of steps, each of which is completed over time * @author Henri Cook */ public class StatusBar extends JLabel implements ImageObserver { private static final long serialVersionUID = 1L; private ArrayList parts = new ArrayList(); public StatusBar (int steps) { if (steps < 2) throw new IllegalArgumentException ("Status Bars must have at least two states"); parts.add(new ImageIcon(StatusBar.class.getResource("/images/statusbar-left-filled.jpg").getPath())); for (int i=1; i