All pastes #557679 Raw Edit

TONY REN

public java v1 · immutable
·published 2007-06-11 02:04 UTC
rendered paste body
//William & Frank//Jeopardyimport javax.swing.*;import java.awt.*;import java.awt.event.*;class Jeopardy{	public static void main (String [] args)	{		game frame = new game();		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);	}}class game extends JFrame implements MouseListener{	private JPanel pane;	private int y;	private int x;	public game ()	{		super ("Jeopardy");		addMouseListener(this);				pane = (JPanel) getContentPane ();				JLabel bg = new JLabel (new ImageIcon("Jeopardy.jpg"));		JLabel highlight1 = new JLabel (new ImageIcon("Jeopardy start.jpg"));		JLabel highlight2 = new JLabel (new ImageIcon("Jeopardy score.jpg"));		JLabel highlight3 = new JLabel (new ImageIcon("Jeopardy instruction.jpg"));					pane.add (highlight1);                highlight1.setVisible(false);		pane.add (bg);					setSize(700, 550);		setLocationRelativeTo(null);		setVisible(true);	}	public void mouseClicked (MouseEvent e)	{		x = e.getX();		y = e.getY();		System.out.println ("x: " + e.getX());		System.out.println ("y: " + e.getY());		if (x > 169 && y > 266 && x < 273 && y < 294)		{                highlight1.setVisible(true);			System.out.println ("whateveR");		}	}	public void mousePressed (MouseEvent e)	{	}	public void mouseReleased (MouseEvent e)	{		}	public void mouseEntered (MouseEvent e)	{	}	public void mouseExited (MouseEvent e)	{	}}