Search:

Type: Posts; User: Norm

Search: Search took 0.26 seconds.

  1. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    The formatting of the if statement is hard to understand. Also some comments would make it easier to understand. Here's a rewrite:

    // don't consume: digit,...
  2. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    Try adding a println() statement that prints out the value of input. Then execute the code and press all the keys one at a time to see what is passed to the variable: input. I don't think...
  3. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    Can you give some more details on where you are having problems? What is the "that" you refer to?
  4. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    No, there is one that has the value 'n'.
    Did you look at the values of the static KeyEvent variables that the code uses? Which one of them had the value: (int)'n'?
  5. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    The KeyEvent values are int, not char. Look at their values and see if (int)'n' is one of them.
  6. Replies
    12
    Views
    1,059

    Re: need help with consuming key events.

    Can you make a small, complete program that compiles, executes and shows the problem?
Results 1 to 6 of 6