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

Text Package: Not retrieving bound actions correctly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.3.0
    • client-libs

      For about all of the components in the text package: JTextField, JTextArea, JPasswordField, JTextPane, and JEditorPane, making a call to "getBoundActions()" from their Keymap is not returning correct values.

      Here is a simple program to demonstrate this. Also, try the other text components to verify the bugs in them as well:

      ---------------- Cut Here ------------------------

      import javax.swing.*;
      import javax.swing.text.*;

      public class JTextTest {

          JPasswordField text = new JPasswordField();

          public JTextFieldTest() {
              Keymap keymap = text.getKeymap();
              Action[] action = keymap.getBoundActions();

              System.out.println(action.length);

              for(int i = 0; i < action.length; i++)
                  System.out.println(action[i].getValue(Action.NAME));
          }

          public static void main(String[] args) {
              new JTextTest();
          }
      }

      ------------ Cut Here ---------------------------

      edmund.lou@eng 1999-12-15

            svioletsunw Scott Violet (Inactive)
            elousunw Edmund Lou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: