ELComboBox keyboard action throws exception(Read 8035 times)
ELComboBox keyboard action throws exception on: August 06, 2009, 12:14:24 PM
Hi

I use very often ELComboBox. Focused component throws exception
afrer 'enter' button hit. Stack trace looks like this:
Code: javascript:void(0);
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JTextField
        at org.herabookdb.widgets.windows.HBWFilterWindow$5.actionPerformed(HBWFilterWindow.java:623)
        at javax.swing.JTextField.fireActionPerformed(JTextField.java:487)
        at javax.swing.JTextField.postActionEvent(JTextField.java:668)
        at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:783)
        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
        at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
        at javax.swing.JComponent.processKeyBindings(JComponent.java:2807)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
        at java.awt.Component.processEvent(Component.java:5379)
        at java.awt.Container.processEvent(Container.java:2010)
        at java.awt.Component.dispatchEventImpl(Component.java:4068)
        at java.awt.Container.dispatchEventImpl(Container.java:2068)
        at java.awt.Component.dispatchEvent(Component.java:3903)
        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
        at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
        at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
        at java.awt.Component.dispatchEventImpl(Component.java:3941)
        at java.awt.Container.dispatchEventImpl(Container.java:2068)
        at java.awt.Window.dispatchEventImpl(Window.java:1801)
        at java.awt.Component.dispatchEvent(Component.java:3903)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

My code is very simple:
Code: javascript:void(0);
        ELComboBox select = new ELComboBox();
select.setData(temp);
select.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String sel = (String) ((ELComboBox)e.getSource()).getSelectedRecord().get(0);
setFilterField(sel);
}
});
It looks like something in your code, but I could be wrong. It doesn't stop my program, and data in ELComboBox
is filled right, but it throws exception so it could lead to some strange and difficult
to locate problems.

Best regards
        Krystian



Re: ELComboBox keyboard action throws exception Reply #1 on: August 06, 2009, 06:12:01 PM
Please, check your code in setFilterField method.



 

Sitemap 1 2 3 4 5