Results 1 to 4 of 4
Thread: Kep Pressed
- 02-27-2011, 10:28 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 33
- Rep Power
- 0
Kep Pressed
^Key*^
Hello,
I am trying to write a simple program where i want it to check that if
the space bar is pressed, then it prints out something. I was thinking it would be "if(keypressed == Spacebar)" but i cant seem to figure it out. I dont want to use Java.awt or a key listener, just be simple.Last edited by mustachMan; 02-27-2011 at 10:33 PM.
-
- 03-01-2011, 02:02 AM #3
Yeah, the main thread of a non-gui app doesn't respond to events. It'd actually be a lot more work to write something to do that without using Swing.
- 03-01-2011, 08:07 PM #4
Member
- Join Date
- Dec 2009
- Posts
- 33
- Rep Power
- 0
Similar Threads
-
Unable to capture key pressed :((
By N00Bie in forum New To JavaReplies: 20Last Post: 02-19-2011, 04:57 PM -
Detect the ENTER key being pressed
By aaronfsimons in forum New To JavaReplies: 12Last Post: 05-16-2009, 08:48 PM -
get key pressed
By prashant in forum NetworkingReplies: 1Last Post: 03-26-2009, 09:10 PM -
Waiting for a button to be pressed
By SomeGuyOverThere in forum New To JavaReplies: 6Last Post: 08-21-2008, 09:30 PM -
key pressed event
By kavithas in forum New To JavaReplies: 7Last Post: 12-10-2007, 02:01 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks