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

setDefaultButton with JTextField's

    Details

    • Subcomponent:
    • Resolved In Build:
      kestrel
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: el35337 Date: 09/17/98


      I read in the book: CORE Java Foundation Classes from Kim Topley that the
      setDefaultButton method (of JRootPane) only works when you are not in a text
      component.

      Now when you want to fill in a form (linked to a database) that is a combination
      of JTextField's en JLabel's the focus is always in a JTextField and pushing the
      ENTER key won't work. I don't think this is desired behaviour. Everywhere where
      you fill in forms you can push ENTER to transmit your filled in data.

      Since a JTextField doesn't do a thing with KeyEvent.VK_ENTER, why not change this
      behaviour? It would be more appropriate if ENTER would trigger the default button.
      Of course not when the focus is for example on a JTextArea.
      (Review ID: 38973)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              tprinzinsunw Timothy Prinzing (Inactive)
              Reporter:
              elarsen Erik Larsen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: