File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What listener to implement for JList? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What listener to implement for JList?" Watch "What listener to implement for JList?" New topic
Author

What listener to implement for JList?

Bud Tippins
Ranch Hand

Joined: Jan 28, 2011
Posts: 52
I have the following code in NetBeans. On line #7 I'm getting the following error: "cannot find symbol - symbol: class ListSelectionListener" - question: what Listener should I have ListTest implement for a JList?

Thank you.



Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

ListSelectionListener is part of javax.swing.event package which you haven't imported in your Java code.


Mohamed Sanaulla | My Blog
Bud Tippins
Ranch Hand

Joined: Jan 28, 2011
Posts: 52
Thank you. That worked.
 
Don't get me started about those stupid light bulbs.
 
subject: What listener to implement for JList?
 
Similar Threads
help!!!a problem about java gui
JList error
JRadioButtonList error
How to create a horizontal JList?
A scrollable JList?