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

improper popup menu when instantiated on a list box

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3
    • client-libs
    • None
    • x86
    • windows_nt



      Name: rlT66838 Date: 08/19/97


      1. Create a class that extends awt List
      2. Add a few entries to the list
      3. Add a popup menu to the List component
      4. add a few menu items to this popup menu
      5. enable Mouse Event Mask
          i.e.enableEvents (AWTEvent.MOUSE_EVENT_MASK);
      6. Add method processMouseEvent :
       public void processMouseEvent (MouseEvent e) {
         int x = e.getX();
         int y = e.getY();
       

         if (e.isPopupTrigger() ) {
      System.out.println("In POP up" + (pm.getItem(0)).getLabel() +
      (pm.getItem(1)).getLabel());
         pm.show(this, e.getX(), e.getY());

         }
      super.processMouseEvent(e);
         }

      7. When this class is instantiated, the labels in the popup menu when
      instantiated by right click do not appear correctly.

      ======================================================================

            msomlosunw Mike Somlo (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: