File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Listeners & Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Listeners & Interfaces" Watch "Listeners & Interfaces" New topic

Listeners & Interfaces

S. Stacey

Joined: Jul 03, 2003
Posts: 20
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
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
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?

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
S. Stacey

Joined: Jul 03, 2003
Posts: 20
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...:-(
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Do you have a problem, but need help understanding how to apply this material towards solving it -- or are you in search of an appropriate problem to apply it to?

[Jess in Action][AskingGoodQuestions]
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 276
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,
S. Stacey

Joined: Jul 03, 2003
Posts: 20
Yes that helps me out alot....THANKS
I agree. Here's the link:
subject: Listeners & Interfaces
It's not a secret anymore!