View Single Post
  #1 (permalink)  
Old 02-04-2008, 03:05 AM
Prometheus Prometheus is offline
Member
 
Join Date: Feb 2008
Posts: 2
Prometheus is on a distinguished road
Polled keyboard input through swing
Hello!

A new member here, with a question I have wanted to know the answer to for absolutely ages, and have never found a solution to...

Is is possible to setup a swing form to handle polled keyboard input. By this, I mean overridding the event model for keyboard input, and instead invoke some "getch()" style method.

For the current project I have in mind (a game) it is not desirable to for the usual event behavior of keyboard input, (eg keyTyped(), keyPressed(), keyReleased()).

Instead, I require a method which can be invoked, block execution and then return the keypress. Im not even sure this can be acheived... Any ideas?
Reply With Quote
Sponsored Links