Keyboard input

HI i have a little problem.
I'm currently working on a little programm for school.
I dont want to read any strings from my keyboard, but only one key, like the CTRL, ALT or the Arrow keys ofcourse without the use of enter.

I hope someone can help me with this little problem.
MFG

ps. i hope my englisch isn't that bad :P

Comments

  • : HI i have a little problem.
    : I'm currently working on a little programm for school.
    : I dont want to read any strings from my keyboard, but only one key,
    : like the CTRL, ALT or the Arrow keys ofcourse without the use of
    : enter.
    :
    : I hope someone can help me with this little problem.
    : MFG
    :
    : ps. i hope my englisch isn't that bad :P
    :

    Look in the Java API guide for the Scanner class. This will get a string from stdin (the keyboard). You might also use a JOptionPane. These are both fairly easy for a beginner to use. If you are not in a graphical environment (e.g. programming at the UNIX command line), use the Scanner class.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion