aspose file tools*
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
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: 19762
    
  20

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
How To Ask Questions How To Answer Questions
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    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: 4658
    
    5

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error at addListSelectionListener(this)