Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled

From:[jdnc-interest@masked-domain]
Sent on:Tue, 06 May 2008 07:09:36 PDT
In reply to:ArrayIndexOutOfBoundsException in JXList when FilterEnabled sent on Mon, 05 May 2008 20:08:52 PDT by [jdnc-interest@masked-domain]
I have the same problem with 0.9.2. The following code works when filters are disabled but throws an ArrayBlablabaException when enabled and one of the list items are selected.

[code]
public class ListMess {
public static void main(String[] args) {
final DefaultListModel model = new DefaultListModel();
model.addElement("What");
model.addElement("the");
model.addElement("bleep");
model.addElement("is");
model.addElement("wrong");

final JXList list = new JXList(model);

list.setFilterEnabled(true);
list.setFilters( new FilterPipeline(new ShuttleSorter()));
list.addListSelectionListener( new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
Object item = list.getSelectedValue();
model.removeElement( item );
}
});

JPanel panel = new JPanel( new BorderLayout() );
panel.add( list );
JFrame frame = new JFrame();
frame.setContentPane( panel );
frame.pack();
frame.setVisible( true );
}
}
[/code]

Is this bug related to issue #2? Didn't want to create an extra entry in the issue tracker.

Fondest regards,
Erik
[Message sent by forum member 'clandestino057' (clandestino057)]

http://forums.java.net/jive/thread.jspa?messageID=272957

---------------------------------------------------------------------
To unsubscribe, e-mail: [jdnc-unsubscribe@masked-domain]
For additional commands, e-mail: [jdnc-help@masked-domain]
Found what you were looking for? If not - continue at Wiki Index

Other messages in this topic

SenderDate sentSubject
[jdnc-interest@masked-domain]Tue, 27 May 2008 10:55:31 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Thu, 15 May 2008 18:22:05 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Thu, 15 May 2008 09:03:53 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Fri, 09 May 2008 12:39:45 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Fri, 09 May 2008 09:58:46 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Fri, 09 May 2008 09:47:49 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Thu, 08 May 2008 11:29:03 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Thu, 08 May 2008 10:56:14 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Tue, 06 May 2008 17:23:46 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Tue, 06 May 2008 05:52:09 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
Kleopatra [fastegal@masked-domain]Tue, 06 May 2008 09:51:39 +0200Re: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Mon, 05 May 2008 20:10:24 PDTRe: ArrayIndexOutOfBoundsException in JXList when FilterEnabled
[jdnc-interest@masked-domain]Mon, 05 May 2008 20:08:52 PDTArrayIndexOutOfBoundsException in JXList when FilterEnabled

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources
FitNesse Resources