Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4171685

Focusing on JTextField in JWindow will cause ClassCastException.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • client-libs
    • 1.2fcs
    • sparc
    • solaris_2.6
    • Not verified

      JDK Version: 1.2fcs-H
      OS: Solaris 2.6 & 2.7
      Locale: zh & C

      I have attched a program.
      In 1.2fcs-H,
      java JTextFocus
      use mouse to click on one of the JTextField
      Exception will generate as follows: (Also we can not see the cursor)
      Exception occurred during event dispatching:
      Exception occurred during event dispatching:
      java.lang.ClassCastException: sun.awt.motif.MWindowPeer
              at sun.awt.motif.X11InputMethod.activate(X11InputMethod.java:216)
              at sun.awt.im.InputContext.activate(InputContext.java:194)
              at sun.awt.im.InputContext.dispatchEvent(InputContext.java:129)
              at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:148)
              at java.awt.Component.dispatchEventImpl(Component.java:2315)
              at java.awt.Container.dispatchEventImpl(Container.java:1031)
              at java.awt.Component.dispatchEvent(Component.java:2284)
              at java.awt.LightweightDispatcher.setFocusRequest(Container.java:1581)
              at java.awt.Container.proxyRequestFocus(Container.java:1125)
              at java.awt.Container.proxyRequestFocus(Container.java:1120)
              at java.awt.Container.proxyRequestFocus(Container.java:1120)
              at java.awt.Container.proxyRequestFocus(Container.java:1120)
              at java.awt.Component.requestFocus(Component.java:3553)
              at javax.swing.JComponent.requestFocus(JComponent.java:663)
              at javax.swing.text.DefaultCaret.mousePressed(DefaultCaret.java:316)
              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:220)
              at java.awt.Component.processMouseEvent(Component.java:3181)
              at java.awt.Component.processEvent(Component.java:3023)
              at java.awt.Container.processEvent(Container.java:986)
              at java.awt.Component.dispatchEventImpl(Component.java:2373)
              at java.awt.Container.dispatchEventImpl(Container.java:1031)
              at java.awt.Component.dispatchEvent(Component.java:2284)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1805)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1688)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1623)
              at java.awt.Container.dispatchEventImpl(Container.java:1018)
              at java.awt.Window.dispatchEventImpl(Window.java:678)
              at java.awt.Component.dispatchEvent(Component.java:2284)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:258)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)


      jim.hu@prc 1998-09-07

            okutsu Masayoshi Okutsu
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: