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

RFE: JTextField doesn't contain getActionCommand (only setActionCommand)

XMLWordPrintable

    • Fix Understood
    • generic
    • generic

      Name: ddT132432 Date: 08/10/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)



      Running command:

      \jdk1.3.1\bin\javac Tests.java

      Tests.java containing (e.g. in main() method):


          javax.swing.JCheckBox checkBox = new javax.swing.JCheckBox();
          javax.swing.JTextField textField = new javax.swing.JTextField();

          // Both have the mutator:
          checkBox.setActionCommand("test command");
          textField.setActionCommand("test command 2");

          // e.g. JCheckBox has accessor:
          String commmand = checkBox.getActionCommand();
          // JTextField doesn't:
          String commmand2 = textField.getActionCommand();

      => Error message:

      Tests.java:xxx: cannot resolve symbol
      symbol : method getActionCommand ()
      location: class javax.swing.JTextField
          String commmand2 = textField.getActionCommand();
                                      ^
      (Review ID: 129740)
      ======================================================================

            peterz Peter Zhelezniakov
            ddressersunw Daniel Dresser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: