Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4093041

Solaris (2.5): CheckboxMenuItem in PopupMenu can not be changed (works on NT)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1, 1.1.4, 1.2.0
    • client-libs
    • 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)
      ======================================================================

            lbunnisunw Lara Bunni (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: