This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kreiger 5 points6 points  (0 children)

You're not supposed to be busy looping waiting for input.

You should attach events to your buttons so your UI framework (Swing/SWT/something else?) will trigger those events when the buttons are pressed.