The Artima Developer Community
Sponsored Link

Java Answers Forum
Event Handling (not using applets)

7 replies on 1 page. Most recent reply: Sep 6, 2003 7:35 AM by Patrick

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 7 replies on 1 page
Patrick

Posts: 5
Nickname: iceman9
Registered: Sep, 2003

Event Handling (not using applets) Posted: Sep 4, 2003 8:59 PM
Reply to this message Reply
Advertisement
Can someone please help my create a workable Event Handler that will handle mouse clicks and keyboard strokes? I am not coding an applet, just strictly javacode. I've found code for doing it w/ applets, but not straight up. And I can't seem to convert the applet code either.


zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: Event Handling (not using applets) Posted: Sep 4, 2003 11:48 PM
Reply to this message Reply
Firstly, you can read: http://java.sun.com/docs/books/tutorial/uiswing/events/index.html.
and if after this you cannot get it well, i think you must try again here :).

Patrick

Posts: 5
Nickname: iceman9
Registered: Sep, 2003

Re: Event Handling (not using applets) Posted: Sep 5, 2003 5:13 AM
Reply to this message Reply
Everythign there seems to be for applets. I've tried those steps and still nothing. I really don't know what I"m missing or what I need. I'm used to programming in opengl, but for this program I'm to use java, which I don't know too well. Any more ideas? thanks. :)

Patrick

Posts: 5
Nickname: iceman9
Registered: Sep, 2003

Re: Event Handling (not using applets) Posted: Sep 5, 2003 5:33 AM
Reply to this message Reply
Come to find out, each time I complied and ran the code, it wasn't making any changes so I was seeing the same thing again. My roomate just caught the error and now the code works. stupid eclipse :P

Joe Parks

Posts: 107
Nickname: joeparks
Registered: Aug, 2003

Re: Event Handling (not using applets) Posted: Sep 5, 2003 7:22 AM
Reply to this message Reply
What was the problem?

Patrick

Posts: 5
Nickname: iceman9
Registered: Sep, 2003

Re: Event Handling (not using applets) Posted: Sep 5, 2003 7:27 AM
Reply to this message Reply
I copied code from one class to another, unknowingly, eclipse linked the two classes together and was running the cone I copied it from instead of what I was changing. so no matter what I changed, the changes wouldn't be visible. How we caughtit was we had a gif loaded as a background. when we changed the gif to a different one, the origional gif still loaded. we even commented it out of teh program, removed it from the workspace and the stupid gif still showd up. Crazy huh?

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Event Handling (not using applets) Posted: Sep 6, 2003 12:25 AM
Reply to this message Reply
Ah, the perils of copy-and-paste coding.

Patrick

Posts: 5
Nickname: iceman9
Registered: Sep, 2003

Re: Event Handling (not using applets) Posted: Sep 6, 2003 7:35 AM
Reply to this message Reply
Yeah our teacher made it perfectly clear that she didn't wanna catch anyone copying and pasting code. Good thing that I found the error before I had to go ask for help..lol

Flat View: This topic has 7 replies on 1 page
Topic: Property Names in Swing Previous Topic   Next Topic Topic: Problems with Classpath, Packages and Imports

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use