// Planframe class that extends Frame // Displays an image array in sync with the mainframe // Date: 3-15-99 // Give applet access to all the AWT toolkit libraries import java.awt.*; import java.awt.event.*; public class imageframe extends Frame implements ActionListener, ItemListener, MouseListener{ // declare variables private Image imageview[]; private int drawImage = 0; //public void init(){ // setBackground (Color.white); // constructor with user interaction components public imageframe (String s, Image imageF[], int draw, Frame ref){ super (s); imageview = imageF; drawImage = draw; addWindowListener (new closewindow()); setBackground (Color.black); //System.out.println ("in planframe constructor"); } public void drawImage (Graphics g, Frame ref) //draws the image in the frame { g.drawImage (imageview[drawImage],0,0,350,244,ref); } public void changeImage (int imageCol) { drawImage = imageCol; repaint(); } public void paint (Graphics g) //paints image in the frame { g.setColor (Color.black); drawImage (g, this); } public void mousePressed (MouseEvent e){} public void mouseClicked (MouseEvent e) {} public void mouseEntered (MouseEvent e) {} public void mouseExited (MouseEvent e) {} public void mouseMoved (MouseEvent e) {} public void mouseReleased (MouseEvent e) {} public void actionPerformed (ActionEvent e){} public void itemStateChanged (ItemEvent e){} }