I'm having some trouble implementing a JList in Java using the MVC Pattern because I can't figure out how am I suppose to write the controller and the view(each one in a separte class) so that I can call the methods from the model.Example : In the model I have a method called ( getBooks() ) and in the GUI a frame with a JList so that when I click an item in the list some textboxes will get filled with the appropriate information(title, author etc). The problem is I'm not sure how to write the listeners in the controller and/or in the view.By the way the items from the list should also be loaded from the model.

Thank you.