import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Point extends Frame
implements ActionListener, WindowListener, MouseListener {
private JPanel points1;
private JButton point1;
private ImageIcon pointIcon1;
private ImageIcon pointIcon1Sel;
public static void main (String[] args) {
Point pointing = new Point();
pointing.setTitle("POINT");
pointing.setSize(700,700);
pointing.setBackground(Color.darkGray);
pointing.setCursor(CROSSHAIR_CURSOR);
pointing.setVisible(true);
}
Point() {
makeGui();
addWindowListener(this);
}
public void makeGui() {
points1 = new JPanel();
points1.setLayout(null);
points1.setBackground(Color.lightGray);
ImageIcon pointIcon1 = new ImageIcon( "PointImage1.gif" );
ImageIcon pointIcon1Sel = new ImageIcon( "PointImage1Selected.gif" );
point1 = new JButton("");
points1.add(BorderLayout.CENTER,point1);
point1.addActionListener(this);
points1.add(point1);
point1.setBounds(164,433,50,50);
point1.setBackground(Color.lightGray);
add(BorderLayout.CENTER,points1);
point1.setIcon(pointIcon1);
point1.setBorder(null);
point1.addMouseListener(this);
point1.setEnabled(true);
}
public void windowClosing(WindowEvent e) {
System.exit(0);
}
public void actionPerformed(ActionEvent event) { }
public void mouseEntered(MouseEvent ev) {
if (ev.getSource() == point1) {
point1.setIcon(pointIcon1Sel);
}
}
public void windowOpened(WindowEvent e) { }
public void windowIconified(WindowEvent e) { }
public void windowClosed(WindowEvent e) { }
public void windowActivated(WindowEvent e) { }
public void windowDeiconified(WindowEvent e) { }
public void windowDeactivated(WindowEvent e) { }
public void mousePressed(MouseEvent ev) { }
public void mouseReleased(MouseEvent ev) { }
public void mouseClicked(MouseEvent ev) { }
public void mouseExited(MouseEvent ev) { }
}