dcsimg
A Question of JTextField in applet(using plug-in 1.4)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hua_Su
Posted On:   Thursday, June 20, 2002 01:35 AM

With java plug-in 1.4, when we add a JTextField in an applet, and use some Chinese input method to input some text, a "input window" will pop out to preview the word what you inputed. But after you refresh the page and input again, that "input window" dispearred, and we can find this exception in console: java.lang.NullPointerException at sun.awt.im.CompositionArea.setText(CompositionArea.java:163) at sun.awt.im.CompositionAreaHandler.inputMethodTextChanged(CompositionAreaHandler.java:183) at sun.awt.im.CompositionAreaHandler.processInputMethodEvent(CompositionAreaHandler.java:144) at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:175) at java.awt.Component.dispatc   More>>

With java plug-in 1.4, when we add a JTextField in an applet, and use some Chinese input method to input some text, a "input window" will pop out to preview the word what you inputed. But after you refresh the page and input again, that "input window" dispearred, and we can find this exception in console:


java.lang.NullPointerException
at sun.awt.im.CompositionArea.setText(CompositionArea.java:163)
at sun.awt.im.CompositionAreaHandler.inputMethodTextChanged(CompositionAreaHandler.java:183)
at sun.awt.im.CompositionAreaHandler.processInputMethodEvent(CompositionAreaHandler.java:144)
at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:175)
at java.awt.Component.dispatchEventImpl(Component.java:3476)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)


How to solve this problem? or can I shut off the "input window" when use Chinese input method?

   <<Less
About | Sitemap | Contact