Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    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
  • 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
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
Welcome to the Ranch!

For a problem, you should post only once. You have posted the same problem twice.
Also, BeForthrightWhenCrossPostingToOtherSites

I am locking this thread. You can continue your discussions in the other post
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!