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

Tab doesn't work in first focused component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 6
    • 6
    • client-libs
    • x86
    • linux

      Name: dmR10075 Date: 01/05/2004


      Tab key doesn't work when pressed in a component which received focus
      first. When focus is moved out of it by mouse Tab key starts to work.

      1. Compile and run the following applet with appletviewer.
      2. Press Tab - focus doesn't move
      3. Click by mouse on second text field
      4. Press Tab several times - tab works.

      The problem disappears if you remove requestFocus line from the test.
      Reproducible with 1.4.1, 1.4.2 and all 1.5.0 builds with Motif toolkit.
      Not reproducible with XAWT.

      The test:
      import java.awt.*;
      import java.applet.*;
      /*
      <applet code=Sample1.class codebase=. width=200 height=200></applet>
      */
      public class Sample1 extends Applet
      {
          TextField txtname,txtpass;
          public void init()
          {
              txtname = new TextField(12);
              txtpass = new TextField(8);
              add(txtname);
              add(txtpass);
              txtname.requestFocus();
          }
      }


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

            ant Anton Tarasov (Inactive)
            domsunw Dom Dom (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: