Results 1 to 2 of 2
  1. #1
    mtwisd is offline Member
    Join Date
    Apr 2009
    Posts
    3
    Rep Power
    0

    Unhappy how do you bypass the enter(/n) key in a program?

    Hello,

    I need a simple program that ask's to enter an integer from 0-9 without having to press the enter key. I just want to press the integer key and I want the program to read the key and store it in a variable. Please help me. I am not very proficient in Java. I need help!

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

    Default

    If that's a console app you need the enter key, no other way. If it's a GUI you can add a DocumentListener or KeyListener.

Similar Threads

  1. enter a string sentence
    By amorosa19 in forum New To Java
    Replies: 13
    Last Post: 09-06-2013, 11:34 AM
  2. Replies: 2
    Last Post: 07-13-2009, 05:45 AM
  3. bypass NTLM login
    By ruchsriv in forum Web Frameworks
    Replies: 0
    Last Post: 03-30-2009, 09:23 AM
  4. enter key problem
    By masa in forum AWT / Swing
    Replies: 3
    Last Post: 03-19-2009, 08:30 AM
  5. Javascript and enter button
    By Eric in forum Advanced Java
    Replies: 1
    Last Post: 06-11-2007, 10:39 PM

Posting Permissions

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