Hello Ladies & Gents!!! I am studying java and have run across interfaces and listeners that I am struggling with. My textbook is great with the theory but now I am looking for some practical help. Would anyone happen to know of any good web sites where I can get some help in interfaces & listeners? Thanks for your help Stacey
How about javaranch? Are you having problems writing code? Do you have specific questions about interfaces and listeners? Have you read any threads in the Applets or SwingJFC/AWT forums that might discuss specific problems about certain interfaces and/or listeners?
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Jul 03, 2003
Hi Marlyin, Thanks for your reply. What I am having trouble with is writing the code. I have read through the theory in my textbook and I understand it but I am having trouble applying it...:-( Stacey
Hi Stacey, I think I may know what your question means. I had a hard time in the begining understanding the "why" of interfaces. It gets much clearer over time as you write code. Here is a simple example that helped me:
One purpose of doing this sort of thing, is that you may have code that is using a "Shape" object. It know's that "Shape" provides a "numberOfSides" method, and so you can call that method without actually knowing what shape you are dealing with. You can imagine more complicated methods like getArea() that have differant calculations for the area of the shape based on if it is a square, triangle, circle, etc. Not sure if this is the kind of info you were looking for or if this helps, Hope so, Kim