Attached is a pic of my main screen of my program. Basicly it's a phone book app similiar to one you'd have on your phone. The thing that I can't wrap my mind around, is that you see the nice big textArea there?
After you've added a contact now. What can I use that the user can just click on the name of the contact in the textArea and the appropriate window will display for the contact?

As far as I know, you cant add an actionListener on a piece of text in a textArea. So what do I do? I've also considered packing the textArea full of JButtons displaying the persons name. But that just sounds a bit dodgy...

Oh yes and the contact I'm talking about is just a instance of my Contact class. Asin:

public Contact(String name, String surname, String mobile); //etc etc

Any help please!!

Attachments my_GUI.png 50.12 KB
7 Years
Discussion Span
Last Post by masijade

Okay what's going to be the easier one here now? By the sound of it the JList. Can you add an actionListener to a JList item?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.