Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default enter key concept......

    Hi all....i am working on a login page....which has username textfield,password field and a button
    when the user has entered username and password the validation or any further processing when the user clicks the button
    i want to implement a functionality in which on entering the details the user without clicking the button or bringing focus on the button....presses the entering ENTER key and which works same as like clicking the button

    this functionality is just as same like in gmail etc....where the user enters information and presses enter key

    any suggestion would be highly appreciated

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

  3. #3
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default

    thanx.....

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Java Code:
    frame.getRootPane().setDefaultButton(...);

  5. #5
    sahildave1991 Guest

    Default

    u may use the keylistener and compare value of keypressed with default value....for eg...the values of keys are ::
    enter - 10
    esc 27

    etc...
    google it you may find results.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    Quote Originally Posted by sahildave1991 View Post
    u may use the keylistener and compare value of keypressed with default value....for eg...the values of keys are ::
    enter - 10
    esc 27

    etc...
    google it you may find results.
    That's just ... silly. Especially when the correct answer has already been given.

    db

Similar Threads

  1. How Enter key act like TAB?
    By mine0926 in forum New To Java
    Replies: 2
    Last Post: 06-03-2010, 06:44 AM
  2. Enter
    By Arnold in forum New To Java
    Replies: 8
    Last Post: 10-18-2009, 09:17 AM
  3. enter key in swt
    By ashin in forum SWT / JFace
    Replies: 0
    Last Post: 07-17-2009, 09:42 AM
  4. Map concept in JAVA
    By Mathan in forum New To Java
    Replies: 19
    Last Post: 06-27-2008, 06:02 AM
  5. mail concept
    By thamizhisai in forum Advanced Java
    Replies: 4
    Last Post: 04-11-2008, 07:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •