Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2065
| From | "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> |
|---|---|
| Subject | ListSelectionListener Res |
| Message-ID | <44-dnRhl6_OnVwbbnZ2dnUVZ_oimnZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:36 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui This seems quite different than the issue I had with an ActionListener responding twice (it was added twice). I've even checked to make sure this list box has only one ListSelectionListener. I have a JList that allows multiple interval selection and the ListSelectionListener is called when I press the mouse button down and when I release it. Somewhere along the way, I also get a third event. I added a line to the start of the valueChanged() method and it prints once when I press down on the left mouse button and twice more when I let the button up. I can't find anything in the ListSelectionEvent that lets me check to see if the event is from a mouse button down or up or a mouse click and I haven't found a reference to this happening. I haven't had this problem before, so I could see how it's related to allowing multiple intervals, but I'm still not clear on what is going on. Why am I getting multiple ListSelectionEvents and what do I do if all I want is one so I can then get the selected indices from the list? Thanks! Hal --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar | Unroll thread
ListSelectionListener Res "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: ListSelectionListener "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: ListSelectionListener "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: ListSelectionListener "Hal Vaughan" <hal.vaughan@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: ListSelectionListener "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: ListSelectionListener "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
csiph-web