Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
polling problems
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: polling problems (Read 3334 times)
fireside
double
Posts: 607
polling problems
«
on:
February 14, 2008, 02:31:28 am »
I can't seem to get keyboard polling working in the hello world program. I copied the poll and keyaffected functions from the fps and have some variables. I don't get errors on the program, but when I try to run it with the polling I get these errors:
Exception in thread "main" java.lang.NullPointerException
at HelloWorldAWTGL.poll(HelloWorldAWTGL.java:92)
at HelloWorldAWTGL.loop(HelloWorldAWTGL.java:56)
at HelloWorldAWTGL.main(HelloWorldAWTGL.java:24)
OK I think it was null because I didn't include these lines:
frame.addWindowListener(new WindowEvents());
keyMapper=new KeyMapper(frame);
but now I get an error on the WindowEvents() function saying it can't resolve it, so apparently I'm not importing something.
«
Last Edit: February 14, 2008, 03:07:16 am by fireside
»
Logged
click here->
Fireside 7 Games
<-
fireside
double
Posts: 607
Re: polling problems
«
Reply #1 on:
February 14, 2008, 03:12:27 am »
Nevermind, apparently I didn't need to do anything with WindowEvents, I just needed to add the keymapper to the frame, or vice versa, whatever.
Logged
click here->
Fireside 7 Games
<-
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
polling problems