Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2070

Re: ListSelectionListener

From "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this>
Subject Re: ListSelectionListener
Message-ID <aTQmi.30$nl4.19@newsfe06.lga> (permalink)
Newsgroups comp.lang.java.gui
References <nridndFhse0fSwbbnZ2dnUVZ_vLinZ2d@comcast.com>
Date 2011-04-27 15:37 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui

"Hal Vaughan" <hal@thresholddigital.com> wrote in message 
news:nridndFhse0fSwbbnZ2dnUVZ_vLinZ2d@comcast.com...
> Jeff Higgins wrote:
>
>>
>> Hal Vaughan wrote:
>>> 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?
>>>
>>
>> I may be way off base, if so please disregard. ..or throw me out !-)
>> <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4323107>
>
> That seems to apply.  I can follow most of that, but they discuss using
> DefaultListSelectionModel to see if the value is adjusting or not.  I 
> can't
> see how to get DefaultListSelectionModel from my JList.  Am I missing
> something obvious?
>
> How can I check to see if it is adjusting or not?
>

You can use .getSelectionModel on the JList, but I think they are saying
to check the value of ListSelectionEvent.getValueIsAdjusting in your
valueChanged(ListSelectionEvent e) method.

Not absolutely certain on this one.
JH

---
 * 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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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