@@ -0,0 +1,527 @@
+import java.awt.event.MouseAdapter;%0Aimport java.awt.event.MouseEvent;%0A%0Aimport javax.swing.JFrame;%0Aimport javax.swing.SwingUtilities;%0A%0Apublic class CustomMouse2 extends MouseAdapter %0A%7B%0A%09int width, height; JFrame frame1;%0A%09public CustomMouse2(int w, int h, JFrame frame)%0A%09%7B%0A%09%09width = w;%0A%09%09height = h;%0A%09%09frame1 = frame;%0A%09%7D%0A%09%0A%09public void mouseClicked(MouseEvent e)%0A%09%7B%0A%09%09if(SwingUtilities.isLeftMouseButton(e))%0A%09%09%7B%0A%09%09%09MinesweeperFrame frm = new MinesweeperFrame(width,height);%0A%09%09%09frm.setVisible(true);%0A%09%09%09frame1.dispose();%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create CustomMouse2.java