classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: Make negative JList.setSelectedIndex() clear the s


From: Roman Kennke
Subject: Re: [cp-patches] RFC: Make negative JList.setSelectedIndex() clear the selection
Date: Mon, 09 Jan 2006 19:31:18 +0100

Hi Mark,

Am Montag, den 09.01.2006, 16:43 +0100 schrieb Mark Wielaard:
> Hi,
> 
> I have a program here that seems to expect JList.setSelectedIndex(-1) to
> clear the current selection. Currently we get into trouble since we
> unconditionally call setSelectionInterval(-1, -1) in that case. Changing
> it to call clearSelection() when negative seems to make sense since it
> is consistent with getSelectedIndex() which returns -1 when there is no
> selection.
> 
> 2006-01-09  Mark Wielaard  <address@hidden>
> 
>     * javax/swing/JList.java (setSelectedIndex): Clear selection when
>     argument is negative.
> 
> Does this patch make sense?

Sounds ok. If it fixes a problem with your app, then go ahead and check
it in.

/Roman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]