This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Error at addListSelectionListener(this) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Error at addListSelectionListener(this)" Watch "Error at addListSelectionListener(this)" New topic
Author

Error at addListSelectionListener(this)

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi All,

its showing an in the line // list.addListSelectionListener(this);

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20131
    
  30

Next time please show the error. However, this time it's pretty obvious - this is an instance of JListTest, and that does not implement ListSelectionListener.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351
    
    2

it was even obvious to me. you have to implement the listener interface


SCJP
Visit my download page
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5044
    
  10

Or better still, add a ListSelectionListener in the form of an anonymous inner class.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error at addListSelectionListener(this)
 
jQuery in Action, 3rd edition