Skip to main content

TableRowSorter -> SortController ClassCastException

2 replies [Last post]
htomi
Offline
Joined: 2009-09-28
Points: 0

Hi all,
I use SwingX 1.6.2, and I use TableRowSorter and RowFilter to filter my JXTable.
But when I resize one of my columns I get this exception on an infinite loop:

java.lang.ClassCastException: javax.swing.table.TableRowSorter cannot be cast to org.jdesktop.swingx.sort.SortController         at org.jdesktop.swingx.JXTableHeader$HeaderListener.resetToggleSortOrder(JXTableHeader.java:584)         at org.jdesktop.swingx.JXTableHeader$HeaderListener.mouseExited(JXTableHeader.java:626)         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)         at java.awt.Component.processMouseEvent(Unknown Source)         at javax.swing.JComponent.processMouseEvent(Unknown Source)         at java.awt.Component.processEvent(Unknown Source)         at java.awt.Container.processEvent(Unknown Source)         at java.awt.Component.dispatchEventImpl(Unknown Source)         at java.awt.Container.dispatchEventImpl(Unknown Source)         at java.awt.Component.dispatchEvent(Unknown Source)         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)         at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source)         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)         at java.awt.Container.dispatchEventImpl(Unknown Source)         at java.awt.Window.dispatchEventImpl(Unknown Source)         at java.awt.Component.dispatchEvent(Unknown Source)         at java.awt.EventQueue.dispatchEvent(Unknown Source)         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.run(Unknown Source)
Is it my bad, or some JXTable issue?
Thanks,
Tamas

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kschaefe
Offline
Joined: 2006-06-08
Points: 0

What is the source code for creating your table? Can you provide a small, runnable demo?
Karl

htomi
Offline
Joined: 2009-09-28
Points: 0

Thank you, but it was my mistake, sorry about the false alert...
I spent the whole yesterday with this bug, and after a sleep I found the bug in my code.
Tamas