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

character subset is not set as expected in JTextField

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 6, 7, 8, 9, 10, 11, 12
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:

      Description

      OS: ALL
      Build:
      this issue reproduced on JDK 9 141, 6u141b06, 7u131b06, 8u121b07

      steps to reproduce:
      #Create a new J text field
      tfKata = new JTextField(20);
      #Set the field only accept a part of unicode characters
      getContentPane().add(setPanel(tfHKata,
                                                "Character.UnicodeBlock.KATAKANA"));
      tfHKata.addFocusListener(new FocusAdapter() {
                      public void focusGained(FocusEvent e) {
                          InputContext ic = tfHKata.getInputContext();
                          Character.Subset[] s = { Character.UnicodeBlock.KATAKANA };
                          ic.setCharacterSubsets(s);
                      }
                  });

      Actual results:
      any kind of characters can be typed in all text fields.

      Expected Results:
      only restricted characters can be typed.

        Attachments

          Activity

            People

            • Assignee:
              prr Philip Race
              Reporter:
              yliu Johnny Liu (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: