Posted Friday, February 12, 2010 @ 16:28:53
This must be something simple, because it should be in alot of other code, and is actually in the examples in the javadocs...
When I first populate my table, I set the Connection, setSelectSql, and refresh(). This works fine.
However, when the user selects a different table (from a combobox), I set the new select (setSelectSql) and execute a refresh(), but it always returns a SQLException. The stack trace is as follows, but I don't get much out of it. Even when I change the combobox back to the original DB table, which populated the table the first time just fine, it returns the same SQLException?
Please help?
-AJ
java.sql.SQLException
at quick.dbtable.DBTable.refresh(DBTable.java:2859)
at com.webtek.dbArchive.viewerMain.itemStateChanged(viewerMain.java:115)
at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1162)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1219)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:1266)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:100)
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:88)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:551)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:597)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:808)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:476)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)