Re: Newbie question: how to have Action triggered by Enter key, and ComboBoxModel as inner class.
<[email protected]> Mon, 25 Oct 2004 10:33:47 +0200
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Organization | http://freemail.web.de/ |
| Message-ID | <[email protected]> |
Hello, > However, I haven't been able to figure out where to call addKeyListener() in my > SwiXML program. I invariably get nullPointerExceptions when I try to. If I don't > do that, the comboBox works OK (executing a specified AbstractAction) but > doesn't respond to the Enter key. Perhaps you can give code showing how you rendered the xml? From the information you gave, I can only guess at the reason of the NPE. Did you spell the id wrong? Do you use the id attribute at all for your ComboBox? Providing the ComboBoxModel as inner class is IMHO very possible. Of course it has to be a public static inner class but despite this I do'nt see any problem why initclass="mypackage.MyOuter.MyInnerClass" should't work... Yours, Frank