Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ListSelectionListener valueChanged fired twice

843805Jun 6 2006 — edited Sep 3 2008
public void valueChanged(ListSelectionEvent e) {
if(!e.getValueIsAdjusting()) {
System.err.println("INSIDE THE METHOD.............");
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
}
}

In this method, when I enter a value, it prints the output and again when I change to another row it again prints the output.

Why is this getting fired twice? I just want to get the updated value of a previous row when the user goes to another row. TIA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2008
Added on Jun 6 2006
10 comments
3,229 views