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

Focusing on JTextField in JWindow will cause ClassCastException.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Not verified

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: