import java.awt.*;
|
import java.applet.*;
|
import java.awt.event.*;
|
import java.applet.*;
|
import java.net.*;
|
|
public class Pop extends Applet implements MouseMotionListener
|
{
|
|
int popCount = 0;
|
public void init()
|
{
|
|
addMouseMotionListener(this);
|
}
|
|
|
public void mouseMoved(MouseEvent me)
|
{
|
|
if (popCount < 10)
|
{
|
String link = "http://www.google.com";
|
try
|
{
|
AppletContext a = getAppletContext();
|
URL url = new URL(link);
|
a.showDocument(url,"_new");
|
}
|
catch (MalformedURLException e){
|
System.out.println(e.getMessage());
|
}
|
|
popCount++;
|
}
|
}
|
|
public void mouseDragged(MouseEvent me)
|
{
|
}
|
|
}
|