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

PopupMenu is not working with 1.1.5 (while it is working fine with 1.1.4)!!!

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5.1

      Description



      Name: diC59631 Date: 05/13/98


      import java.awt.*;
      import java.awt.event.*;
       
      public class Main extends Frame {
       
          PopupMenu pop = new PopupMenu("Delete");
          Scrollbar sb = new Scrollbar(Scrollbar.HORIZONTAL, 50, 5, 0, 100);
          public Main() {
              super("Example");
              setSize(200, 120);
              pop.add(new MenuItem("Delete this ScrollBar"));
              sb.addMouseListener(new MouseEventHandler());
              sb.add(pop);
              add(sb);
              show();
          }
       
          public static void main(String [] args) {
              Main m = new Main();
          }
       
          private class MouseEventHandler extends MouseAdapter {
       
              public void mouseReleased(MouseEvent evt) {
                  if (evt.isPopupTrigger()) {
                      System.out.println("POP UP RELEASED");
                  }
                  else
                      System.out.println(" NOT A POP UP");
              }
       
              public void mousePressed(MouseEvent evt) {
                  if (evt.isPopupTrigger()) {
                      System.out.println("POP UP PRESSED");
                      pop.show(sb , evt.getX(), evt.getY());
                  }
                  else
                      System.out.println(" %% NOT A POP UP");
              }
          }
       
       
      }
      (Review ID: 30067)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rkhansunw Robi Khan (Inactive)
                Reporter:
                dindrigo Daniel Indrigo (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: