-
Bug
-
Resolution: Duplicate
-
P1
-
None
-
1.3.0
-
generic
-
solaris_2.6
Run the attach sample "appletviewer test.html", click anywhere in the
appletviewer frame window after the applet have been loaded...
test.html:
<Applet Code=test_popupmenu.class Width=480 Height=360></Applet>
test_popupmenu.java:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class test_popupmenu extends Applet
implements ItemListener, MouseListener
{
PopupMenu menu;
CheckboxMenuItem check;
public void init()
{
menu = new PopupMenu("Test CheckboxMenuItem");
check = new CheckboxMenuItem("Checkbox", true);
menu.add(check);
this.add(menu);
check.addItemListener(this);
this.addMouseListener(this);
}
public void itemStateChanged(ItemEvent evt)
{
System.out.println("check changed = " + evt);
System.out.println("");
}
public void mouseClicked(MouseEvent evt)
{
menu.show(this, 10, 10);
System.out.println("PopupMenu's parent=" + menu.getParent());
}
public void mousePressed(MouseEvent evt)
{
}
public void mouseReleased(MouseEvent evt)
{
}
public void mouseEntered(MouseEvent evt)
{
}
public void mouseExited(MouseEvent evt)
{
}
}
appletviewer frame window after the applet have been loaded...
test.html:
<Applet Code=test_popupmenu.class Width=480 Height=360></Applet>
test_popupmenu.java:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class test_popupmenu extends Applet
implements ItemListener, MouseListener
{
PopupMenu menu;
CheckboxMenuItem check;
public void init()
{
menu = new PopupMenu("Test CheckboxMenuItem");
check = new CheckboxMenuItem("Checkbox", true);
menu.add(check);
this.add(menu);
check.addItemListener(this);
this.addMouseListener(this);
}
public void itemStateChanged(ItemEvent evt)
{
System.out.println("check changed = " + evt);
System.out.println("");
}
public void mouseClicked(MouseEvent evt)
{
menu.show(this, 10, 10);
System.out.println("PopupMenu's parent=" + menu.getParent());
}
public void mousePressed(MouseEvent evt)
{
}
public void mouseReleased(MouseEvent evt)
{
}
public void mouseEntered(MouseEvent evt)
{
}
public void mouseExited(MouseEvent evt)
{
}
}
- duplicates
-
JDK-4249509 hotjava SEGV when right click on web page.
- Closed
- relates to
-
JDK-4250267 Kestrel "I" fails java_awt/interactive/event/EventTests.html#EventTest0015 test
- Closed
-
JDK-4250146 Kestrel "I" fails api/java_awt/interactive/PMenuTests.html#PMenu test
- Closed