-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1, 1.1.4, 1.2.0
-
generic, sparc
-
solaris_2.5.1, solaris_2.6
Name: rm29839 Date: 11/14/97
1.
Click inside the appletwindow. The popmenu should appear
with the checkbox set.
Click on the checkbox, a println statement should appear on the console.
Click again, the popmenu should appear again with the checkbox
not set.
However, the state of the checkbox does not change, no println
appears on the console.
The itemStateChanged is NOT received.
It works under NT.
2.
// File test_popupmenu.java
// begin
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");
}
public void mouseClicked(MouseEvent evt)
{
menu.show(this, 0, 0);
}
public void mousePressed(MouseEvent evt)
{
}
public void mouseReleased(MouseEvent evt)
{
}
public void mouseEntered(MouseEvent evt)
{
}
public void mouseExited(MouseEvent evt)
{
}
}
// end
3.
4.
The line "check changed" should appear when the checkbox
state is changed.
5.
(Review ID: 19650)
======================================================================
- duplicates
-
JDK-4045826 Sol: Item event is not generated if checkbox menuitem in popup menu is clicked
- Closed
- relates to
-
JDK-4112486 Current input method selection should be shown in the IM switching menu
- Closed