Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create costume interface

 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Coders
In my GUI I am using several components of the same type. Take multiple Jlist as an example, to be able capturing its both events I need to create two classes within my main class which implements the ListSelection interface each one.
I thought about easier way�if I can create interface like this:

Then by implementing the interface I can listen to each Jlist without the need of creating implementation classes and without conflicts and more logic.
But the problem is with the method: JLIst.addSelectionListener ()
What do I need to do to register my interface with the Jlist?
Thanks in advance
Shay Gaghe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic