« Return to Thread: JXTable selection issue

Re: JXTable selection issue

by Holger Brands :: Rate this Message:

Reply to Author | View in Thread

Hey Jonathan,

how did you setup the JXTable with Glazed Lists?
What version of SwingX do you use?
Did you disable the selection mapper?

Some info is available here:
http://sites.google.com/site/glazedlists/documentation/swingx

If that does not help, you could try to use
EventJXTableModel instead of DefaultEventTableModel.
Issue
https://glazedlists.dev.java.net/issues/show_bug.cgi?id=445
gives some info about why EventJXTableModel exists.

Hope this helps,
Holger

>
> Hi all,
>
> I am using a JXTable from SwingX in my application. I'm not sure why I get
> this exception, but it is annoying. It happens when I update my table by
> clearing out the model and updating it. This happens on the latest release
> of GlazedLists. The exception is as follows:
>
> java.lang.IndexOutOfBoundsException: Invalid range for selection: 2-2, list
> size is 2
> at
> ca.odell.glazedlists.ListSelection.setSubRangeOfRange(ListSelection.java:997)
> at ca.odell.glazedlists.ListSelection.select(ListSelection.java:610)
> at
> ca.odell.glazedlists.swing.DefaultEventSelectionModel.addSelectionInterval(DefaultEventSelectionModel.java:234)
> at
> ca.odell.glazedlists.swing.EventSelectionModel.addSelectionInterval(EventSelectionModel.java:101)
> at
> org.jdesktop.swingx.decorator.DefaultSelectionMapper.mapTowardsView(DefaultSelectionMapper.java:122)
> at
> org.jdesktop.swingx.decorator.DefaultSelectionMapper$1.contentsChanged(DefaultSelectionMapper.java:278)
> at
> org.jdesktop.swingx.decorator.FilterPipeline.fireContentsChanged(FilterPipeline.java:556)
> at
> org.jdesktop.swingx.decorator.FilterPipeline.filterChanged(FilterPipeline.java:374)
> at org.jdesktop.swingx.decorator.Filter.fireFilterChanged(Filter.java:361)
> at org.jdesktop.swingx.decorator.Filter.refresh(Filter.java:350)
> at org.jdesktop.swingx.decorator.Filter.refresh(Filter.java:74)
> at
> org.jdesktop.swingx.decorator.FilterPipeline$IdentityFilter.refresh(FilterPipeline.java:636)
> at
> org.jdesktop.swingx.decorator.FilterPipeline.flush(FilterPipeline.java:499)
> at org.jdesktop.swingx.JXTable.use(JXTable.java:1732)
> at org.jdesktop.swingx.JXTable.tableChanged(JXTable.java:1503)
> at
> javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
> at
> ca.odell.glazedlists.swing.DefaultEventTableModel.handleListChange(DefaultEventTableModel.java:122)
> at
> ca.odell.glazedlists.swing.DefaultEventTableModel.listChanged(DefaultEventTableModel.java:100)
> at
> ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:412)
> at
> ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:409)
> at
> ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
> at
> ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
> at
> ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:316)
> at
> ca.odell.glazedlists.impl.gui.ThreadProxyEventList$UpdateRunner.run(ThreadProxyEventList.java:231)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
>
> Any thoughts would be much appreciated.
> Cheers,
> Jonathan Giles
> --
> View this message in context: http://www.nabble.com/JXTable-selection-issue-tp24404426p24404426.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: JXTable selection issue