This listener works 95% of the time:
messagesJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
messagesJListValueChanged(evt);
}
});
however, he will someday register at an inconvenient time. Undoubtedly, my error handling is the main problem. That being said, there is an alternative listener that combines different listeners of the mouse and keyboard, but only those events?
source
share