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

JTextField/Comp. can't consume KeyEvents under Win32 in 1.2RC2 (Solaris OK)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6, 1.2.0
    • client-libs
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_95, windows_nt



      Name: krT82822 Date: 11/18/98


      In response to bug 4186905, I would like to
      place this on the table as a serious issue.
      It is still around in rc2.

      The biggest issue here is that the parent
      component, a JTextField in my case, receives
      events and processes them anyway.

      I have made an InputMask field for entering dates
      and things, but since JTextFields goes about its
      business on Windows without much regard for
      anything else, my component is rendered useless
      on Windows, while pretty handy on Solaris.

      Here is some code that produces nothing when
      keys are typed on Solaris (rightly) and is
      ignored on Windows. This will not be
      easy to code around.

      JTextField field = new JTextField();
      field.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
      e.consume();
      }
      public void keyTyped(KeyEvent e) {
      e.consume();
      }
      public void keyReleased(KeyEvent e) {
      e.consume();
      }
      });
      (Review ID: 42931)
      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: