• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clear Selected Item in OTHER JList  RSS feed

 
halest webmaster
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

I have the following problem:
There are 2 JLists in my frame:



Now, these are mutually exclusive, so if someone clicks an item in the one list, the previous selection in the other list should be cleared.



On calling the Value is adjusting fucntion I always get the nullpointerException:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at Books$3.valueChanged(Books.java:199)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)


Why is that? As you can see, they have been declared and should be accessible.

Thank you very much in avance!

Halest
 
Michael Dunn
Ranch Hand
Posts: 4632
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words, please BeForthrightWhenCrossPostingToOtherSites.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!