Java Reference
In-Depth Information
LISTING 11.8
continued
DISPLAY
LISTING 11.9
//********************************************************************
// LightBulbPanel.java Author: Lewis/Loftus
//
// Represents the image for the LightBulb program.
//********************************************************************
import
javax.swing.*;
import
java.awt.*;
public class
LightBulbPanel
extends
JPanel
{
private boolean
on;
private
ImageIcon lightOn, lightOff;
private
JLabel imageLabel;
//-----------------------------------------------------------------
// Constructor: Sets up the images and the initial state.
//-----------------------------------------------------------------
Search WWH ::
Custom Search